Click or drag to resize
AudioCompressionManagerSilence Method
Creates silence

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

Parameters

format
Type: SystemIntPtr
audio format
milliseconds
Type: SystemInt32
silence in milliseconds

Return Value

Type: Byte
audio data with silence
Examples
This example shows simple using of Silence method.
FormatDetails[] formatList = AudioCompressionManager.GetFormatList(AudioCompressionManager.Gsm610FormatTag);
IntPtr format = formatList[formatList.Length - 1].FormatHandle;
WaveWriter ww = new WaveWriter(File.Create("file.wav"), AudioCompressionManager.FormatBytes(format));
byte[] data = AudioCompressionManager.Silence(format, 10000);
ww.WriteData(data);
ww.Close();
See Also