neumatho / NostalgicPlayer

Music/module player written in C# that can play old modules from the Amiga and PC days. You can download modules from my home page.
https://nostalgicplayer.dk
MIT License
38 stars 4 forks source link

Fix SetVolume for systems with more than two channels #33

Closed RobDangerous closed 1 year ago

RobDangerous commented 1 year ago

I got a System.ArgumentOutOfRangeException when trying to play a file with the exception-message "SetAllVolumes MUST be supplied with a volume level for ALL channels. The AudioStream has 8 channels and you supplied 2 channels. (Parameter 'levels')". outputFormat.Channels was also just 2 for me so I use audioClient.AudioStreamVolume.ChannelCount instead.

neumatho commented 1 year ago

Thanks for the fix.