pulseaudio

Java audio Clip cannot be closed when using Linux PulseAudio

送分小仙女□ 提交于 2019-12-06 08:22:36
问题 I'm trying to play a sound in a Java application but the application never actually terminates because the PulseAudio Eventloop thread is left running even after trying to close the Clip instance used for playing the sound: import java.io.File; import java.io.IOException; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import javax.sound.sampled.DataLine; import javax.sound.sampled

pactl called from systemd service always reports “pa_context_connect() failed connection refused”

邮差的信 提交于 2019-12-06 01:14:15
I've setup a systemd service file to perform some pactl operations at system startup for a test process. While the commands work fine when performed from a terminal I always get "pa_context_connect() failed connection refused" when running the same script from the systemd service by starting the service. I'm also using the 'User=' directive in the service file to ensure that the auto-login user matches the user used to run the service commands. I've read that this is somehow related to the pulseaudio session not being valid in the environmentless context of the systemd service but I haven't

Pulseaudio not detecting bluetooth headset [closed]

无人久伴 提交于 2019-12-05 15:06:12
I am trying to connect a bluetooth headset to my RPI. My setup is the following: archlinux-arm, kernel: linux-raspberrypi 3.12.23-1 bluez4 4.101-4 from AUR , built and installed bluez-tools 0.1.38-3 bluez-utils 5.20-1 pulseaudio 5.0-1 pulseaudio-alsa 2-3 I scan for the device, successfully pair it, add as trusted and connect it: hcitool scan bluez-simple-agent hci0 <MAC> bt-device --set <MAC> Trusted 1 bt-audio -c <MAC> After this, the device state is as follows ( bt-device -i <MAC> output): [00:23:7F:2A:3B:24] Name: PLT 510 Alias: PLT 510 [rw] Address: 00:23:7F:2A:3B:24 Icon: audio-card Class

Error playing audio file from Java via PulseAudio on Ubuntu

只谈情不闲聊 提交于 2019-11-30 23:36:28
The message on the shell is: Exception in thread "main" java.lang.IllegalArgumentException: Invalid format at org.classpath.icedtea.pulseaudio.PulseAudioDataLine.createStream(PulseAudioDataLine.java:142) at org.classpath.icedtea.pulseaudio.PulseAudioDataLine.open(PulseAudioDataLine.java:99) at org.classpath.icedtea.pulseaudio.PulseAudioDataLine.open(PulseAudioDataLine.java:283) at org.classpath.icedtea.pulseaudio.PulseAudioClip.open(PulseAudioClip.java:402) at org.classpath.icedtea.pulseaudio.PulseAudioClip.open(PulseAudioClip.java:453) at reprod.ReproducirFichero(reprod.java:16) at reprod

How to redirect from Audio Output to Mic Input using PulseAudio?

好久不见. 提交于 2019-11-30 11:32:11
I'm working on a mobile app for Maemo/MeeGo and Maemo uses PulseAudio. I want to play a mp3 to caller (and cancel the mic when doing it, and not to listen caller, everything should be done on background), to do this, I have to redirect Audio Output from a certain (if not possible, all) app, fake it as a Input and make Phone app use it. On my Ubuntu PC, I did it with pavucontrol. I created a NULL sink, then: Audio Output (from Amarok) --> to NULL Output Skype Input <-- NULL Output Skype Output --> NULL And It worked, Amarok played the music and It was streaming to Skype, without playing it to

How to expose audio from Docker container to a Mac?

心不动则不痛 提交于 2019-11-30 04:58:27
I know it's possible by using pulse audio on a Linux host system But paprefs is built for linux not mac. The Docker-for-Mac VM doesn't have any sound passthrough device, so there isn't anything that you could take advantage of from that angle. By contrast, a virtualbox or vmware fusion VM does have the ability to do passthrough audio. I was able to get pulseaudio installed and working on OSX with the following command: brew install pulseaudio I was able to verify this worked by running the following, hearing sound come out of my speakers: paplay cockatiel.wav My next step is to find an image

How to redirect from Audio Output to Mic Input using PulseAudio?

…衆ロ難τιáo~ 提交于 2019-11-29 17:48:25
问题 I'm working on a mobile app for Maemo/MeeGo and Maemo uses PulseAudio. I want to play a mp3 to caller (and cancel the mic when doing it, and not to listen caller, everything should be done on background), to do this, I have to redirect Audio Output from a certain (if not possible, all) app, fake it as a Input and make Phone app use it. On my Ubuntu PC, I did it with pavucontrol. I created a NULL sink, then: Audio Output (from Amarok) --> to NULL Output Skype Input <-- NULL Output Skype Output

PyAudio does not work and breaks sound on ubuntu

谁说我不能喝 提交于 2019-11-29 06:58:06
Ok, so I installed pyaudio from the package python-pyaudio using apt-get , now when I Import and Invoke as follows: Python 2.7.3 (default, Sep 26 2012, 21:53:58) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pyaudio >>> p= pyaudio.PyAudio() ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable ALSA

How to expose audio from Docker container to a Mac?

徘徊边缘 提交于 2019-11-28 22:58:59
问题 I know it's possible by using pulse audio on a Linux host system But paprefs is built for linux not mac. 回答1: The Docker-for-Mac VM doesn't have any sound passthrough device, so there isn't anything that you could take advantage of from that angle. By contrast, a virtualbox or vmware fusion VM does have the ability to do passthrough audio. I was able to get pulseaudio installed and working on OSX with the following command: brew install pulseaudio I was able to verify this worked by running