Closed searock closed 6 years ago
The piece missing is how you play the music, what is it set to output to? I’ve used aplay and output to the alsa pulse plugin, from there I have been able to move the pulseaudio sink to the new bt device.
What is the output of the following:
sudo pactl list sinks
I have found that omxplayer plays directly to hardware so it won’t work with pulseaudio, something like aplay should work for wav files though.
I can’t remember exactly the command but something like
sudo aplay -D pulse /file/path.wav
in the event that that doesn't work what you can do is make an adjustment or ensure the ~/.asoundrc
file looks as follows
# .asoundrc file
pcm.!default{
type pulse
}
ctl.!default{
type pulse
}
Then simply run the command
sudo aplay /path/to/file.wav&
Then, move the input to the output via
sudo pactl move-sink-input `sudo pactl list sink-inputs | grep "Sink Input" | sed "s/Sink Input #//"` SINK_NUM
where SINK_NUM is the bluetooth device found via sudo pactl list sinks
EDIT:
For sudo aplay -D pulse /file.wav
to work you need to ensure you have a PCM device named pulse
they should look as follows:
# ~/.asoundrc
pcm.pulse{
type pulse
}
ctl.pulse{
type pulse
}
Thanks for your quick reply. I am able to play audio on the bluetooth speaker.
Awesome, glad it works!
I have downloaded Raspbian Jessie and I am able to connect to my bluetooth speaker, thanks for your efforts. I tried all 3 OS of raspberry pi and none of it worked before.
But I am not able to hear any audio when I play wav files using omxplayer. Am I missing some of the settings?