How to play non-PCM file or convert it to PCM on the fly ?
问题 The following code works with some wav files, but with others I get, "InvalidOperationException was unhandled. Message=Sound API only supports playing PCM wave files." var webClient = new WebClient(); webClient.DownloadFile(url, fileName); var fileSound = new SoundPlayer(fileName); fileSound.PlaySync(); Is there a way to programmatically check if a wav file is "bad" (not a PCM wave file) and then convert it as necessary? What is odd is that the code works in the legacy Delphi app - all of the