Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,924 Members 45,402 Now Online
XDA Developers Android and Mobile Development Forum

Audio playback via the internal microphone

Tip us?
 
koljsch
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 7
Join Date: Oct 2009
Default Audio playback via the internal microphone

How can I play a wav file from the speaker that is used during a call?
Seen that this is possible through the built-in functions for VoIP, but did not understand how to implement this.
Thanks in advance!
 
GoodDayToDie
Old
#2  
Recognized Developer
Thanks Meter 2,699
Posts: 5,682
Join Date: Jan 2011
Location: Seattle
... that's the headset speaker, not the microphone. Microphones are audio *input* devices. OK, now that we're clear on that...

Please remember to search before posting. Also remember to post in the correct section. This is a question; it belongs in Q&A. If you were offering an app or library or hack of some kind, you would post it here.

To attempt to answer the question... looks like you either need to use
Code:
Windows.Phone.Media.Devices.AudioRoutingManager.GetDefault().SetAudioEndpoint(Windows.Phone.Media.Devices.AudioRoutingEndpoint.Earpiece)
if you're working in managed code, or use GetDefaultAudioRenderId and specify the value Communications from the AudioDeviceRole enum. Note that doing this may require that your app declare the ID_CAP_VOIP capability.
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
The Following User Says Thank You to GoodDayToDie For This Useful Post: [ Click to Expand ]
 
koljsch
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 7
Join Date: Oct 2009
Thank you! Thank you so much! I've been looking for an answer to this question! Once again, thank you!
 
koljsch
Old
(Last edited by koljsch; 8th March 2014 at 02:45 PM.)
#4  
Junior Member - OP
Thanks Meter 0
Posts: 7
Join Date: Oct 2009
This code throws an exception 'E_ACCESDENIED'. As I understand it can be used only during a VoIP call. Whether it can be realized without the active VoIP call?
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Lock Apps and Functions Easily with Droid Protector

Access and security are some of the key issues facingmobile technology. Whether … more

ARChon Lets You Run Android Apps in Google Chrome Browser

Not too long ago, Google added the ability torun select Android applications on … more

Flyme OS Finds Its Way to the Google Nexus 5

Flyme OS is a heavily modified Android variantdeveloped by the Meizu team for their MX … more

MultiROM Makes Its Way to the LG G2

Over the last few weeks, we’ve seen quite a fewflagship (and former flagship) devicesget to … more