Choose QRadioTuner Audio Output: Bluetooth over Wired (Symbian Qt)
-
Hey guys
Some background info:
I like listening to the radio. I also like using bluetooth headphones.
The radio in mobile devices requires a wired headset.
I always thought if you're going to attach a long wired cord to your phone, you may as well use it. That is until I found "this cord":http://www.yourcablestore.com/assets/images/h3m2m1.jpg in my house.
It's a very small 3.5mm male to 3.5mm cable.I tested this cable out and it gives me perfect signal for my favourite radio stations! Awesome! One problem: as soon as I plug this cable in to my Symbian device, the bluetooth audio cuts out and it tries to pump audio via the headphone jack. Not cool!
So I wrote my own Radio app in Qt (QRadioTuner). Can download "Symbian version here":http://www.wikiupload.com/G03I5WDE2CU75HQ if you want to see.
It also exhibits the same problem.So I am wondering, how can I force the app to output via Bluetooth rather than headphone jack?
-
I dont think there would be any API to route audio in Qt. You can have it done in symbian using native symbian API.
-
In symbian you can make use of the Audio Routing API plugin. "This":http://wiki.forum.nokia.com/index.php/Audio_Routing_API_–_Input_and_Output wiki article might help you. Its supported only from 3rd Ed FP1 onwards.
-
Even that API you linked to seems incapable of choosing which output to use.
It has options as None, All, Private, Public.Both the bluetooth headset and the headphone jack are classified as 'Private'. If I choose 'Private', it will choose headphone jack.
Anyway, I believe you can change audio output in Phonon but only for media that you play via Phonon. Right?
Also found "this relevant post":http://developer.qt.nokia.com/forums/viewthread/1883 on forum.
-
[quote author="xsacha" date="1292137696"]Even that API you linked to seems incapable of choosing which output to use.
It has options as None, All, Private, Public.Both the bluetooth headset and the headphone jack are classified as 'Private'. If I choose 'Private', it will choose headphone jack.
Anyway, I believe you can change audio output in Phonon but only for media that you play via Phonon. Right?
Also found "this relevant post":http://developer.qt.nokia.com/forums/viewthread/1883 on forum.[/quote]
Yes, it seems so. When I had used it I had to route it to loudspeaker.
I have not explored Phonon libraries. Also it seems I had read somewhere that for mobile it might be replaced by QMultimedia.
-
Well that forum post I linked to mentions QtMultimedia for Symbian.
It mentions that Symbian has a 'S60MediaPlayerAudioEndpointSelector'. Great! So I "checked the source out":http://qt.gitorious.org/qt-mobility/contacts/blobs/master/plugins/multimedia/symbian/mmf/mediaplayer/s60mediaplayeraudioendpointselector.cpp.
'Default' -> No. 'All' -> No. 'None' -> No. 'Earphone' -> No. 'Speaker' -> No!Seriously? Have they forgotten about Bluetooth, FM Transmitter and any other audio outputs that are possible?
It seems that these outputs are grouped under 'Earphone'. They are only used when an earphone isn't available.
Also, this QRadioTuner seems to use "OpenMAXAL":http://qt.gitorious.org/qt-mobility/contacts/trees/master/plugins/multimedia/symbian/openmaxal/radiotuner which doesn't seem to have any audio output options available.
This is the line I want options for:
xaradiosessionimpl.cpp
@
locator_outputmix.locatorType = XA_DEFAULTDEVICEID_AUDIOOUTPUT;
audioSink.pLocator = (void*) &locator_outputmix;
@ -
That's something I am worried about. There is lot of things to be supported in Qt API's and it has a long way to go. Till then I feel comfortable relying only with Symbian SDK for such projects.
Also in symbian some api's are exposed only to partners - don't know how Qt will be handling this.
-
Obviously, I don't want to rewrite the whole radio in Symbian C++. And I can't change the Radio's output directly in Qt. So I'm looking for a solution in between.
See that OpenMAXAL code above? Is there a way to add options to this and expose it to my source? It'd then work on devices? Or is that baked in to the Qt libraries?
By the way: It would at least solve my use-case if the cable could be identified as an 'Antenna' rather than 'Headphones' so it wouldn't try to play music via it. Unfortunately, the radio complains 'Connect a wired headset' if I make the cable identify as anything other than 'Headphones'.
-
I'm not familiar with the BH-505 other than knowing it has a wired and bluetooth mode.
You are using BH-505 in bluetooth (non-wired) mode? You also have a used headphone jack with half an old cable to get antenna signal from? Yet it plays back via bluetooth?
Can you take me through the steps you do to achieve this? Thanks. -
Same as you, Nokia 5800.
It won't play radio without a wired line from headphone jack. But once I connect it, it tries to put audio through the headphone jack... even though it's just a dead line connected to nothing.
Of course, it gives me an option to use loudspeaker instead. But that wouldn't help :(. -
I use next item as antenna - "http://pikucha.ru/852752":http://pikucha.ru/852752