Click or drag to resize
AudioCompressionManagerChangeSpeed Method (IntPtr, Byte, Int32)
Changes the speed of audio data

Namespace: Alvas.Audio
Assembly: Alvas.Audio (in Alvas.Audio.dll) Version: 2016.0.6173.41573
Syntax
public static byte[] ChangeSpeed(
	IntPtr format,
	byte[] data,
	int persent
)

Parameters

format
Type: SystemIntPtr
audio format
data
Type: SystemByte
audio data
persent
Type: SystemInt32
100 is normal speed, 50 is reduced by half, 200 is increased in 2 times

Return Value

Type: Byte

[Missing <returns> documentation for "M:Alvas.Audio.AudioCompressionManager.ChangeSpeed(System.IntPtr,System.Byte[],System.Int32)"]

Examples
This example shows simple using of ChangeSpeed 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.ChangeSpeed(format, data, persent);
Mp3Writer mw = new Mp3Writer(File.Create(outFile));
mw.WriteData(outData);
mw.Close();
See Also