1

I have an mp3 file and I want to play it through the earpiece rather than the phone's speakers. Since I want the playing to happen, even when in background, I have implemented a Windows Phone Audio Play back agent. Now how can I play the audio in earpiece only?

Arctic
  • 807
  • 10
  • 22

1 Answers1

0

If you use the MediaElement provided to you in the Windows Phone Toolbox you wouldn't have to implement a play back agent or decide what speaker to play it through. If you plug in your earphones the phone will direct audio coming from the MediaElement to the audio jack. This is the native behavior of MediaElement and all mobile sound components.

Filled Stacks
  • 4,116
  • 1
  • 23
  • 36
  • what if I don't have an earphone and need to play the audio through earpiece (where the usual voice call is played)? – Arctic Sep 01 '14 at 13:48
  • Oh... do you mean the top speaker? Why would you want to play sound there, it will be very bad quality and also doesn't make sense to use that. You have a fine audio speaker to play loud sounds with. Maybe if you explain what you want to do it would make a bit more sense? – Filled Stacks Sep 02 '14 at 15:35