Audio playback via the internal microphone

Search This thread

koljsch

Member
Oct 3, 2009
7
0
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

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
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.
 
  • Like
Reactions: koljsch

koljsch

Member
Oct 3, 2009
7
0
Thank you! Thank you so much! I've been looking for an answer to this question! Once again, thank you!
 

koljsch

Member
Oct 3, 2009
7
0
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?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    ... 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.