Bluetooth/Alsa

1. install packages

# apt-get install bluez-utils bluez-gnome bluez-alsa

2. setup ~/.asoundrc file

$ sudo hcitool scan
Scanning ...
        XX:XX:XX:XX:XX:XX       Stereo Headset

cat ~/.asoundrc
pcm.bluetooth {
        type bluetooth
        device "XX:XX:XX:XX:XX:XX"
        profile "auto"
}

3. connect bluetooth sound device (ex, Bluetoooth Headphone)

4. Let's play!

$ mplayer -ao alsa:device=bluetooth /tmp/hoge.mp3

First, please change alsa-audio-device in ~/.config/vlc/vlcrc.

From:

# ALSA Device Name (string)
#alsa-audio-device=default

To:

# ALSA Device Name (string)
alsa-audio-device=bluetooth

Next, you can play sound data with vlc.

$ vlc /tmp/hoge.mp3

Or

vlc --aout alsa --alsa-audio-device bluetooth /tmp/hoge.mp3

 Enable=Socket