C# - .WAV Playback Randomly High Pitch

Posted by Nate Shoffner on Stack Overflow See other posts from Stack Overflow or by Nate Shoffner
Published on 2009-10-19T05:31:12Z Indexed on 2011/01/14 23:54 UTC
Read the original article Hit count: 183

Filed under:
|
|
|
|

For some reason, when a WAV file is played back using the snippet below, it randomly plays back screwy, like a high pitch noise. It doesn't happen all the time, just randomly. It seems to happen more often when it is played back more frequently. The WAV properties are below along with the code snippet I am using.

WAV Properties:

Bit Rate - 750kbps
Audio Sample Size - 16 bit
Channels - 1 (mono)
Audio Sample Rate - 44kHz
Audio Format - PCM

Snippet:

System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer(Captcha.Properties.Resources.sound1);
myPlayer.Play();

Is this because of the way I am playing the file or the file itself? Thank you.

© Stack Overflow or respective owner

Related posts about c#

Related posts about audio