locked
waveOut and waveIn API in Vista RRS feed

  • Question

  • Hi,

    I am using waveOut api in vista to play audio bytes(in Mulaw) from a stream.
    However it crashes when I remove the speaker/headphone while playing the data.

    Is there a way to recover from this?
    Is there an easy way to choose another device if the current device being used by waveOut has been
    removed or disabled?

    I am thinking of using core audio api however
    I have to support windowsXP still.

    Do you have any suggestion?
    Should i Use waveOut api for XP then core audio if vista?

    I would really appreciate your help.

    Thanks in Advance!


    maytinaykel
    Wednesday, April 15, 2009 9:45 AM

Answers

All replies

  • Hello

    You can take help of

    http://www.codeproject.com/KB/audio-video/cswavrec.aspx?fid=16677&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=958959&fr=201

    But Microsoft has changed the whole Audio system from Vista and above. It will be good if you try to go with Core Audio APIs for Vista and above configuration.

    And you can try different APIs for XP and below systems.

    For XP you can take help of
    http://www.codeproject.com/KB/audio-video/AudioLib.aspx


    Let me know your response...
    • Proposed as answer by Amolpbhavsar Tuesday, June 2, 2009 3:34 PM
    • Marked as answer by keltins Wednesday, June 17, 2009 7:38 AM
    Tuesday, June 2, 2009 3:19 PM
  • Hi,

    It seems I cannot escape from doing different implementations for XP and Vista above.

    Thank you for your answer.
    maytinaykel
    Wednesday, June 17, 2009 7:38 AM
  • Hi,

    It seems I cannot escape from doing different implementations for XP and Vista above.

    Thank you for your answer.
    maytinaykel

     

    Not so fast.  Don’t jump to conclusions.

     

    I just ran a simple test on XP SP3 32-bit using the GraphEdit application from the SDK.

     

    I played a 16-bit, 44100Hz stereo WAV to a USB headset, and while it was playing I yanked the cable out.  The file continued to play uninterrupted and the audio was automatically redirected to my internal speakers.  (Even though GraphEdit still showed the “USB headset” in the graph).

     

    My point is this; I would seriously consider using DirectShow.  It works on everything from Windows 98 to Windows 7.

     

     

    Wednesday, June 17, 2009 7:53 PM