Click or drag to resize
AudioCompressionManagerGenerateTone Method
Genetate tone with specified parameters

Namespace: Alvas.Audio
Assembly: Alvas.Audio (in Alvas.Audio.dll) Version: 2016.0.6173.41573
Syntax
public static byte[] GenerateTone(
	IntPtr format,
	ToneType toneType,
	int frequency,
	float amplitude,
	int lengthMs
)

Parameters

format
Type: SystemIntPtr
specified audio format
toneType
Type: Alvas.AudioToneType
specified tone type
frequency
Type: SystemInt32
specified frequency
amplitude
Type: SystemSingle
specified amplitude (from 0 to 1f)
lengthMs
Type: SystemInt32
specified length in milliseconds

Return Value

Type: Byte

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

Examples
This example shows simple using of GenerateTone method.
IntPtr format = AudioCompressionManager.GetPcmFormat(1, 16, 44100);
byte[] data = GenerateTone(format, ToneType.Sine, 200, 0.5f, 1000);
See Also