DTMF tones


  • What is the best way to create DTMF tones in Metro apps?
    Saturday, March 31, 2012 4:39 AM


All replies

  • 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

    Tuesday, April 03, 2012 4:01 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.

    Tuesday, April 03, 2012 5:31 PM
  • We 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

    Wednesday, April 04, 2012 5:39 PM
  • 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)

    About WASAPI

    Custom MF source - Real-time communication sample

    I hope this helps,


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    • Marked as answer by Bob_Bao Tuesday, April 10, 2012 6:45 AM
    Saturday, April 07, 2012 12:19 AM