naudio / NAudio

Audio and MIDI library for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Volume seems unaffected for output audio

PhoenixWyllow opened this issue · comments

commented

I am using these two files:
AudioReader.cs
SoundboardPlaybackEngine.cs

It sems the volume is unaffected and will always play at device volume.
Could use a bit of help with this one. What am I doing wrong?

Edit: updated issue with links to current development files

in your Read method you need to read out of _sampleChannel, not readerStream. You'll have to convert back to waveprovider or make your AudioReader just an ISampleProvider

commented

Many thanks for your suggestions. Leaving it just as an ISampleProvider did not seem to work (some sort of issue when passed to MMDevice that I'm too inept to figure out in a few hours before bed) but converting back to an IWaveProvider did work!

Updated my sources if anyone wants to have a look at the "fix".