DTMF tones
-
Saturday, March 31, 2012 4:39 AMWhat is the best way to create DTMF tones in Metro apps?
All Replies
-
Tuesday, April 03, 2012 4:01 PMModerator
I don't know much about DTMF (phone tones) but I assume that you would typically use a sound API (MIDI) to generate these tones, but Metro-style applications do not support MIDI. You can alway play a sound file. Please let me know if you have further questions around this.Matt Small - Microsoft Escalation Engineer - Forum Moderator
- Proposed As Answer by Matt SmallMicrosoft Employee, Moderator Tuesday, April 03, 2012 4:01 PM
-
Tuesday, April 03, 2012 5:31 PM
Thanks Matt for that reply.
I'm looking for any way to generate a tone in my Metro app. The Beep function (http://msdn.microsoft.com/en-us/library/windows/desktop/ms679277(v=vs.85).aspx) would be perfect; however, I see that is not availble for Metro apps.
The problem with playing a sound file is that sound files have fixed length; and, I need to be able to play a sound for an indefinite period which could range from less than a second to several seconds.
Would something lower-level such as XAudio2 be appropriate? Are there any other lower level libraries available for Metro apps which can do this?
Thanks in advance.
-
Wednesday, April 04, 2012 5:39 PMModeratorWe have a media guru who is out today, but when he comes back in I'll have him look at this post.
Matt Small - Microsoft Escalation Engineer - Forum Moderator
-
Saturday, April 07, 2012 12:19 AMModerator
Hey Seek,
I would recommend that you synthisize the DTMF tones yourself. This should be relitively easy given the necessary frequencies are well known. I would use WASAPI to play the synthisized audio. This will certainly give you the best performance. You could also theoretically create a custom Media Foundation source and plug into the Media Engine to enable you to generate DTMF tones from any Metro style app. Both options are viable but you are certainly going to need to use C++.
Win32 and COM for Metro style apps (multimedia)
http://msdn.microsoft.com/en-us/library/windows/apps/hh452756.aspxAbout WASAPI
http://msdn.microsoft.com/en-us/library/windows/desktop/dd371455(v=vs.85).aspxCustom MF source - Real-time communication sample
http://code.msdn.microsoft.com/windowsapps/Simple-Communication-Sample-eac73290I hope this helps,
James
Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/
- Marked As Answer by Bob_BaoMVP, Moderator Tuesday, April 10, 2012 6:45 AM


