AudioCompressionManagerSilence Method |
Creates silence
Namespace: Alvas.AudioAssembly: Alvas.Audio (in Alvas.Audio.dll) Version: 2016.0.6173.41573
Syntax public static byte[] Silence(
IntPtr format,
int milliseconds
)
Public Shared Function Silence (
format As IntPtr,
milliseconds As Integer
) As Byte()
public:
static array<unsigned char>^ Silence(
IntPtr format,
int milliseconds
)
Parameters
- format
- Type: SystemIntPtr
audio format - milliseconds
- Type: SystemInt32
silence in milliseconds
Return Value
Type:
Byteaudio 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