Obtains an audio line
line = audio_getLine() line = audio_getLine(sr,bits,chnls,signed,endian,snap_dur,ring_dur,[mixer])
Double. Sampling rate
Integer. Number of bits per sample
Integer. Number of channels.
Boolean. True means signed data.
Boolean. True means stored in big-endian.
Integer. Duration of snapshot.
Integer. Duration of ring buffer.
Integer. Optional. Mixer ID
Java object. Audio line.
This function obtains a audio line that can then be used to capture audio. With no arguments, a default audio format (8kHz, 8 bits, 1 channel, signed, little-endian) will be used with a compatible mixer at a snapshot duration of 2s and a buffer of 10s. A specific mixer can be selected using its ID (obtained from audio_getMixers) as an additional input.
// Requires a microphone line = audio_getLine(16000,16,1,%t,%t,2,10); audio_startCapture(line) messagebox("Please say something and then click OK to continue","modal"); audio_snapshot(line) audio_playSnapshot(line) audio_stopCapture(line) | ![]() | ![]() |