I've got audio piping into a bluetooth speaker with a pi 3 via pulse and MPD.
Here's how I got it working:
Factory install raspbian jessie (had trouble with lite and bluetooth permissions) onto the raspberry pi 3.
Run raspi-config in terminal and expand the filesystem, then reboot.
Install pulseaudio bluetooth support via the following command.
sudo apt-get install pulseaudio-module-bluetooth
You may want to update apt-get first using the command:
sudo apt-get update
Restart the system. Once it reboots we will enter the bluetooth administration tool using the following command:
bluetoothctl
This will enter a bluetooth administration console. From here we can scan for our speaker and pair it. Pulseaudio must be running for this to work, but it will start by default after you install the packages above. From the bluetooth console run the following command:
scan on
After a bit you should see your speaker(s) listed. To pair and connect, issue the following commands:
trust 00:02:3C:45:05:E7
pair 00:02:3C:45:05:E7
connect 00:02:3C:45:05:E7
You may not need to issue the trust and pair commands, but several searches showed attempting those commands should any issues arise in pairing. If it still doesn't work make sure the pulseaudio daemon is running, and pulseaudio-module-bluetooth is installed.
After you are connected to the speaker you can exit by simply typing exit
in the bluetooth console.
Now you can get your pulseaudio sinks by issuing the command:
pactl list sinks
You should see the speaker listed. You can use this information to configure other applications to route their audio through it. Also, if you install the graphical interface for pulseaudio then you can easily manage the devices for your main desktop, and route the audio from the graphical inteface to the bluetooth speaker. You install it via this command:
sudo apt-get install pavucontrol
You should see the option to manage pulse audio settings afterwards in the main raspbian menu on the desktop.
So this sets up the basic pulseaudio to bluetooth pipe which will work for most desktop applications if you installed pavucontrol. I'm not familiar with MPlayer, but MPD is indeed working via the console. First I installed MPC and MPD:
sudo apt-get install mpd mpc
Then I configured MPD to output to pulse:
sudo nano /etc/mpd.conf
You want to comment out the ALSA output:
# An example of an ALSA output:
#
#audio_output {
# type "alsa"
# name "My ALSA Device"
# device "hw:0,0" # optional
# mixer_type "hardware" # optional
# mixer_device "default" # optional
# mixer_control "PCM" # optional
# mixer_index "0" # optional
#}
And then enable a pulseaudio output:
audio_output {
type "pulse"
name "My Pulse Output"
server "127.0.0.1" # optional
sink "bluez_sink.00_02_3C_44_C9_43" # optional
}
I couldn't get it to work without specifying the sink and server, but yours may.
Last I had to edit pulseaudio to allow this connection:
sudo nano /etc/pulse/default.pa
Add the following line (it's in there without the arguments, and commented out by default)
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16
Now reboot, connect to the speaker via bluetooth ctl, and MPD will output to the bluetooth speaker. You can look up the specifics on MPD, and MPC is a command line client for it that works very well with no extra configuration.