Changes the volume of audio data
This example shows simple using of ChangeVolume method.
string inFile = @"in.mp3"; string outFile = @"out.mp3"; int persent = 50; Mp3Reader mr = new Mp3Reader(File.OpenRead(inFile)); IntPtr format = mr.ReadFormat(); byte[] data = mr.ReadData(); mr.Close(); byte[] outData = AudioCompressionManager.ChangeVolume(format, data, persent); Mp3Writer mw = new Mp3Writer(File.Create(outFile)); mw.WriteData(outData); mw.Close();
AudioCompressionManager Class | Alvas.Audio Namespace