Quantcast
Channel: naudio Work Item Rss Feed
Viewing all articles
Browse latest Browse all 738

Commented Unassigned: UnspecifiedError calling waveOutOpen when using Channel Phantoming or Speaker Fill [16442]

$
0
0
When calling WaveOutEvent.Init() with a device that points to a speaker that has Speaker Fill or Channel Phantoming(Options in Microsoft's basic sound driver) and a sample rate that is exactly equal to the device's sample rate the Init function throws this error:
NAudio.MmException
"UnspecifiedError calling waveOutOpen"

The following crashes when my speakers are set to 16 or 24 bit 44100 quality with either Channel Phantoming or Speaker Fill enabled:
```
//waveProvideris an instance of a class that inherits WaveProvider32
waveProvider.SetWaveFormat(44100, 2);

NAudio.Wave.WaveOutEvent waveOut = new WaveOutEvent();

waveOut.Init(waveProvider);

waveOut.Play();
```
But changing just the first line to Instance.SetWaveFormat(44099, 2); or Instance.SetWaveFormat(44101, 2); and it runs fine. Or ensuring Channel Phantoming and Speaker Fill are disabled and leaving it with sample rate 44100 will also make it run fine.

The same is true if my speakers are set to 48000 sample rate and have the first line as Instance.SetWaveFormat(48000, 2);
Comments: that's a strange issue. Could be a driver problem. might be worth reading the MSDN waveOutOpen documentation and seeing if there are any clues there

Viewing all articles
Browse latest Browse all 738

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>