locked
XNA Audio and WASAPI conflicting? RRS feed

  • Question

  • Hi,

    I've recently been working on integrating some code for a VoIP application. On one end, the UI (mainly the dialer) uses the XNA Audio framework to play sound bytes (DTMF) on button presses. On the other hand, the actual call module uses WASAPI for capturing/rendering audio. After integrating the parts, I was seeing an AUDCLIENT_BUFFER_SILENT flag during the call, and no audio was getting through. I disabled all traces of XNA and tried again, only to see the call work just fine (no silent buffer flag present). 

    Do XNA and WASAPI not play nice? Is there a way to keep using XNA for the sound bytes and WASAPI for calls?

    EDIT: For clarification, the only XNA calls are to create a SoundEffectInstance and then to play it. Nothing is done with the XNA Microphone class .

    Thanks,

    Jim


    • Edited by 8x8 Inc Thursday, December 19, 2013 12:44 AM XNA usage clarification
    Wednesday, December 18, 2013 11:38 PM

Answers

  • Hello,

    The XNA audio extensions have been deprecated for Windows Phone 8. While still included for backward compatibility with the media library it is not recommended for use in new development. It is recommended that you replace an calls to the XNA audio APIs with XAudio2 or WASAPI. XAudio2 may give you functionality that is close to the XNA audio extensions. WASAPI will give you the lowest latency audio experience.

    Native audio APIs for Windows Phone 8

    http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206944(v=vs.105).aspx

    I hope this helps,

    James


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

    Monday, December 23, 2013 9:47 PM

All replies

  • I'll ask our media guru to check out this post.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, December 19, 2013 1:58 PM
  • Hello,

    The XNA audio extensions have been deprecated for Windows Phone 8. While still included for backward compatibility with the media library it is not recommended for use in new development. It is recommended that you replace an calls to the XNA audio APIs with XAudio2 or WASAPI. XAudio2 may give you functionality that is close to the XNA audio extensions. WASAPI will give you the lowest latency audio experience.

    Native audio APIs for Windows Phone 8

    http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206944(v=vs.105).aspx

    I hope this helps,

    James


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

    Monday, December 23, 2013 9:47 PM
  • Ok. Thanks, James. Onward to XAudio2!
    Friday, December 27, 2013 6:55 PM
  • Hi James, 

    Do you know where can I download WASAPI libs?

    Thanks in advance

    FAusto


    faustojc

    Saturday, October 17, 2015 5:35 PM