WaveSoundBuffer.getVisBuffer

機能/意味
Acquisition of data for visualization
タイプ
WaveSoundBufferクラスのメソッド
構文
getVisBuffer(buffer, numsamples, channel, ahead=0)
引数
buffer  Specify the buffer to write the output data.
 The buffer must be an array of 16-bit signed integers, with enough buffers (more than numsamples * channels) to write the samples specified by the numsamples and channels arguments.
 If a value other than 1 is specified for channels, the samples of each channel are interleaved (in the case of stereo, stored in the order of right, left, right, left, ...).
 You must specify a pointer to the first element of the array, but pass it as an integral type.
numsamples  Specify the number of samples to get.
channel  Specify the number of channels to get.
 If you specify 1, you can get the data downmixed to 1 channel if it is not monaural.
 If you specify a number other than 1, you must specify the same number of channels as the sound that is playing. In this case, you can get the data as it is.
ahead  Specify the number of samples to look ahead.
 You can get from the sample that is the number of samples specified by this argument from the current playback position.
 If you specify 0 or omit this argument, it will be obtained from the current playback position.
戻り値
Returns the number of samples obtained.
説明
 Get PCM data for visualization.
 Reads PCM data from the current playback position and writes it to the array specified by the buffer argument.
 However, data may not be read properly depending on the buffer status and playback format.
 Since this method is assumed to be used from plugins written in C or C++, it is not possible to specify an array of TJS in the buffer argument, for example.
 To use this method, you must specify the WaveSoundBuffer.useVisBuffer property as true.