Re: [Bluez-devel] New A2DP support : HOWTO ?

Frederic Dalleau
2007-08-13T16:46:31Z

Hi,

> Certainly a very stupid question : but how do we get started using
> the
> brand new A2DP support ? - for me it seems that it still favors sco over
> a2dp :-(

I modified the test-audio python script to get something like this:
Look at your syslog to see what happen.
I then got my headset connected and could hear something ;)

#!/usr/bin/python
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'),
'org.bluez.Manager')

conn = manager.ActivateService('audio')
audio = dbus.Interface(bus.get_object(conn, '/org/bluez/audio'),
'org.bluez.audio.Manager')

# Create device
path = audio.CreateDevice("00:03:89:AA:BD:64")

# Get org.bluez.audio.Sink interface
sink = dbus.Interface(bus.get_object(conn, path),
'org.bluez.audio.Sink')

try:
sink.Connect()
except:
pass

#sink.Disconnect()

Hope this helps