Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
End Users
Pocket PCActiveSyncMultimediaEBooksWirelessSmartPhones
Developers
Windows MobileSmartPhonesWinCE ProgrammingVB for WinCEVC++ for WinCEPlatform BuilderTest Tools
PocketPC DirectoryFree SoftwareWeb Resources
Related Topics
PalmMobile PhonesMore Topics ...

Pocket PC Forum / Developers / SmartPhones / October 2008

Tip: Looking for answers? Try searching our database.

play sound througth the earpiece

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cheelo - 25 Sep 2008 16:56 GMT
Hi would like to know if someone outthere knows if its possible to playback a
file but not througth the normal phone spearker but from earpiece, as same as
we receive a phone call.

thanks
Cheelo
Dmitry - 26 Sep 2008 09:08 GMT
> Hi would like to know if someone outthere knows if its possible to playback a
> file but not througth the normal phone spearker but from earpiece, as same as
> we receive a phone call.
>
> thanks
> Cheelo

Hi Cheelo

The problem can be solved with RIL API,
see RIL_Initialize, RIL_SetAudioDevices, RIL_Deinitialize.
see http://msdn.microsoft.com/en-us/library/aa923031.aspx

Also the problem could be solved with TAPI afaik
however TAPI function calls (which deal with speaker/earpiece) failed
always at my side,
so i had to switch to RIL

Best regards,
Dmitry
Cheelo - 26 Sep 2008 15:38 GMT
Thanks Dmitry.

Actually, I've got the same result as you onTAPI using phoneSetHookSwitch,
always got the PHONEERR_OPERATIONFAILED error. I would be happy to try using
the Radio Layer API, but since I'm only using Windows Mobile platform which
doesn't provide RIL API, I can't, so  for now I can't resolve the problem.

Regards,
Cheelo

> > Hi would like to know if someone outthere knows if its possible to playback a
> > file but not througth the normal phone spearker but from earpiece, as same as
[quoted text clipped - 16 lines]
> Best regards,
> Dmitry
Dmitry - 27 Sep 2008 14:03 GMT
Hello Cheelo,

you are still able to use the RIL,

all required RIL declarations/definitions can be taken here:
http://www.xs4all.nl/~itsme/projects/xda/ril/ril.h,
http://www.nah6.com/~itsme/cvs-xdadevtools/itsutils/libril/ril.h

Also you can load ril.dll dynamically, with use of LoadLibrary()/
GetProcAddress()

Best regards,
Dmitry

> Thanks Dmitry.
>
[quoted text clipped - 28 lines]
>
> - Show quoted text -
Cheelo - 29 Sep 2008 18:09 GMT
Hi Dmitry,

Oooo, i've got it working dynamically, thanks !! Since you seems to be more
expert than me on that plate :), here are two more questions. Thanks for your
time.

1) RIL_Initialize: the first parameters is the index of the RIL port to use.
On the phone i'm testing it's working only with index 1, but maybe on other
device could be another index value, do you know if there's a way to get that
index more officially at runtime or 1 should always be working ?

2) RIL_SetAudioDevices: still on my WM testing device the member dwTxDevice
affects audio device like this:
0 : external speaker
1..4 : earpiece
5 .. N : out of bound

do you know if there is a way to know at runtime which hardware TxDevice is
available at a specified index ? Maybe on some device 0 would correspond to
earpiece..

Cheers,
Cheelo

> Hello Cheelo,
>
[quoted text clipped - 42 lines]
> >
> > - Show quoted text -
Dmitry - 30 Sep 2008 14:31 GMT
Hi Cheelo,

1) I am not aware much of the first argument, however have found
this:
   http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3014032&SiteID=1

2) yes, i have the same experience, dwTxDevice affects audio device
only;

Indexes of devices can be found in ril.h:
#define RIL_AUDIO_NONE
(0x00000000)      // No audio devices
#define RIL_AUDIO_HANDSET                         (0x00000001)      //
Handset
#define RIL_AUDIO_SPEAKERPHONE             (0x00000002)      //
Speakerphone
#define RIL_AUDIO_HEADSET                         (0x00000003)      //
Headset
#define RIL_AUDIO_CARKIT
(0x00000004)      // Carkit
however MSDN says only 0 and 1 are supported values:
http://msdn.microsoft.com/en-us/library/aa919626.aspx

I used these values only, and confirm RIL_SetAudioDevices works as
expected;
To enable speakerphone RIL_AUDIO_NONE should be passed,
and to enable earpiece - RIL_AUDIO_HANDSET;

There is still way to know about hardware, with use of
RIL_GetAudioDevices():
http://msdn.microsoft.com/en-us/library/aa919176.aspx

However i cannot say if it fails or works properly;

Best regards,
Dmitry

> Hi Dmitry,
>
[quoted text clipped - 68 lines]
>
> - Show quoted text -
Cheelo - 02 Oct 2008 18:22 GMT
GREAT THANKS TO YOU DMITRY!

Cheelo

> Hi Cheelo,
>
[quoted text clipped - 105 lines]
> >
> > - Show quoted text -
dev11 - 06 Oct 2008 17:07 GMT
Hi, Does this just work for one particular device or did you find it works
on a range of devices. We'd interested to know which devices you've actually
managed
to get this to work. Also does this allow say a wav file played with the
Playsound api to be
routed through the earpiece

> GREAT THANKS TO YOU DMITRY!
>
[quoted text clipped - 127 lines]
>> >
>> > - Show quoted text -
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.