WAVEOUT2

From STX Wiki
Jump to navigationJump to search

WAVEOUT2 - real-time signal output

Usage:

WAVEOUT2 SR LBUF NBUF X1 X2

Inputs:
SR
The sampling rate in Hz (number)
LBUF
The playback buffer length in samples (number)
NBUF
The number of playback buffers (number)
X1
The signal frame buffer for the first channel (vector)
X2
The signal frame buffer for the second channel (vector)
Outputs:

None

Function:

Plays a stereo signal on the selected waveout device. In the evaluation I step, the frame buffers X1 and X2 are copied to the signal samples I*Rows(X1) to (I+1)*Rows(X1)-1.

Notes:

If frame buffer X1 or X2 is not connected, the signal of channel 1 or 2 is set to 0.

If both frame buffers are connected, they must be the same length.

The buffer length LBUF is forced to be a multiple of the frame length.

The SPAtoms WAVEIN2 and WAVEOUT2 should be used instead of the old atoms WAVEIN and WAVEOUT.

Navigation menu

Personal tools