0

As title, I just searched very thoroughly on the web, still not having an answer. I'm working with WaveChannel32 like this : WaveChannel32 volumeStream and setting the volume like : volumeStream.Volume, the default value is 1 but if it increase, the volume increase only once, so I suspect is it more like a toggle than a volume control. If I am right, so how to control the volume?
Refer to http://naudio.codeplex.com/wikipage?title=MP3

giiYanJ
  • 3
  • 2
  • 8
  • Have you checked the NAudio samples? There are at least two that also allow you to change the volumen - and they work ;-) – Daniel Hilgarth Dec 03 '12 at 08:58
  • samples? which samples you mean, can you give a link? – giiYanJ Dec 03 '12 at 09:20
  • Well, those from the [download page of the project](http://naudio.codeplex.com/releases/view/96875)? Download "Demo Apps" if you want the binaries, "Source" if you want the source - this will download the complete NAudio source including samples. – Daniel Hilgarth Dec 03 '12 at 09:23
  • nope, can't find any things there =( – giiYanJ Dec 03 '12 at 10:07
  • 1
    Nonsense. Did you even have a look? If so, where did you look? – Daniel Hilgarth Dec 03 '12 at 10:08
  • I download the demo apps, there's a control which is working, but without any code, then I searched the source code, not seeing anything referring to WaveChannel32. Or maybe I searched the wrong way.. – giiYanJ Dec 03 '12 at 10:24
  • That's really poor... I needed al of 30 seconds to find a sample... You should work on your problem solving skills! NAudio-Source\NAudioDemo\SimplePlaybackDemo\SimplePlaybackPanel.cs – Daniel Hilgarth Dec 03 '12 at 11:01

1 Answers1

2

The Volume property is a multiplier. So 1 means keep the volume the same, 0 means silence. 0.5 would make it quieter, 2.0 would double the amplitude of each sample etc. Note that if you increase this value above 1 there is the chance that you will clip your audio later when you play it or convert it back to a WAV file.

Mark Heath
  • 48,273
  • 29
  • 137
  • 194