|Home · Standalone · rtcmix~ · uRTcmix · iRTcmix · Tutorials · Reference|
an open-source digital signal processing and sound synthesis language
|about · links · contact|
rtsetparams - set sampling rate, output channels, etc.
rtsetparams(sampling_rate, num_channels [, buffer_size ])
Set the sampling rate, number of output channels, and (optionally) the buffer size for an RTcmix session.
To have an audio device that handles input and output at the same, you must turn on the record option before calling rtsetparams. Do this with set_option (by saying set_option("record = 1")).
If you want to write a sound file that has more channels than your audio device permits, turn off the audio device with set_option before calling rtsetparams (by saying set_option("audio = off")).
rtsetparams(44100, 2)sets up the session for 44100 sampling rate and two output channels.
rtsetparams(44100, 4, 128)sets up the session for 44100 sampling rate, four output channels, and a buffer size of 128 sample frames.
set_option("record=TRUE") rtsetparams(44100, 2, 64) rtinput("AUDIO")sets up the session for real-time processing of a signal reaching RTcmix from the audio device. You must turn on full duplex operation to tell the audio device to handle input and output simultaneously.