Csound API
6.18
|
Functions | |
PUBLIC void | csoundSetRTAudioModule (CSOUND *csound, const char *module) |
Sets the current RT audio module. More... | |
PUBLIC int | csoundGetModule (CSOUND *csound, int number, char **name, char **type) |
retrieves a module name and type ("audio" or "midi") given a number Modules are added to list as csound loads them returns CSOUND_SUCCESS on success and CSOUND_ERROR if module number was not found More... | |
PUBLIC long | csoundGetInputBufferSize (CSOUND *) |
Returns the number of samples in Csound's input buffer. More... | |
PUBLIC long | csoundGetOutputBufferSize (CSOUND *) |
Returns the number of samples in Csound's output buffer. More... | |
PUBLIC MYFLT * | csoundGetInputBuffer (CSOUND *) |
Returns the address of the Csound audio input buffer. More... | |
PUBLIC MYFLT * | csoundGetOutputBuffer (CSOUND *) |
Returns the address of the Csound audio output buffer. More... | |
PUBLIC MYFLT * | csoundGetSpin (CSOUND *) |
Returns the address of the Csound audio input working buffer (spin). More... | |
PUBLIC void | csoundClearSpin (CSOUND *) |
Clears the input buffer (spin). More... | |
PUBLIC void | csoundAddSpinSample (CSOUND *csound, int frame, int channel, MYFLT sample) |
Adds the indicated sample into the audio input working buffer (spin); this only ever makes sense before calling csoundPerformKsmps(). More... | |
PUBLIC void | csoundSetSpinSample (CSOUND *csound, int frame, int channel, MYFLT sample) |
Sets the audio input working buffer (spin) to the indicated sample this only ever makes sense before calling csoundPerformKsmps(). More... | |
PUBLIC MYFLT * | csoundGetSpout (CSOUND *csound) |
Returns the address of the Csound audio output working buffer (spout). More... | |
PUBLIC MYFLT | csoundGetSpoutSample (CSOUND *csound, int frame, int channel) |
Returns the indicated sample from the Csound audio output working buffer (spout); only ever makes sense after calling csoundPerformKsmps(). More... | |
PUBLIC void ** | csoundGetRtRecordUserData (CSOUND *) |
Return pointer to user data pointer for real time audio input. More... | |
PUBLIC void ** | csoundGetRtPlayUserData (CSOUND *) |
Return pointer to user data pointer for real time audio output. More... | |
PUBLIC void | csoundSetHostImplementedAudioIO (CSOUND *, int state, int bufSize) |
Calling this function with a non-zero 'state' value between csoundCreate() and the start of performance will disable all default handling of sound I/O by the Csound library, allowing the host application to use the spin/spout/input/output buffers directly. More... | |
PUBLIC int | csoundGetAudioDevList (CSOUND *csound, CS_AUDIODEVICE *list, int isOutput) |
This function can be called to obtain a list of available input or output audio devices. More... | |
PUBLIC void | csoundSetPlayopenCallback (CSOUND *, int(*playopen__)(CSOUND *, const csRtAudioParams *parm)) |
Sets a function to be called by Csound for opening real-time audio playback. More... | |
PUBLIC void | csoundSetRtplayCallback (CSOUND *, void(*rtplay__)(CSOUND *, const MYFLT *outBuf, int nbytes)) |
Sets a function to be called by Csound for performing real-time audio playback. More... | |
PUBLIC void | csoundSetRecopenCallback (CSOUND *, int(*recopen_)(CSOUND *, const csRtAudioParams *parm)) |
Sets a function to be called by Csound for opening real-time audio recording. More... | |
PUBLIC void | csoundSetRtrecordCallback (CSOUND *, int(*rtrecord__)(CSOUND *, MYFLT *inBuf, int nbytes)) |
Sets a function to be called by Csound for performing real-time audio recording. More... | |
PUBLIC void | csoundSetRtcloseCallback (CSOUND *, void(*rtclose__)(CSOUND *)) |
Sets a function to be called by Csound for closing real-time audio playback and recording. More... | |
PUBLIC void | csoundSetAudioDeviceListCallback (CSOUND *csound, int(*audiodevlist__)(CSOUND *, CS_AUDIODEVICE *list, int isOutput)) |
Sets a function that is called to obtain a list of audio devices. More... | |
Adds the indicated sample into the audio input working buffer (spin); this only ever makes sense before calling csoundPerformKsmps().
The frame and channel must be in bounds relative to ksmps and nchnls. NB: the spin buffer needs to be cleared at every k-cycle by calling csoundClearSpinBuffer().
PUBLIC int csoundGetAudioDevList | ( | CSOUND * | csound, |
CS_AUDIODEVICE * | list, | ||
int | isOutput | ||
) |
This function can be called to obtain a list of available input or output audio devices.
If list is NULL, the function will only return the number of devices (isOutput=1 for out devices, 0 for in devices). If list is non-NULL, then it should contain enough memory for one CS_AUDIODEVICE structure per device. Hosts will typically call this function twice: first to obtain a number of devices, then, after allocating space for each device information structure, pass an array of CS_AUDIODEVICE structs to be filled:
Returns the address of the Csound audio input buffer.
Enables external software to write audio into Csound before calling csoundPerformBuffer.
Returns the number of samples in Csound's input buffer.
retrieves a module name and type ("audio" or "midi") given a number Modules are added to list as csound loads them returns CSOUND_SUCCESS on success and CSOUND_ERROR if module number was not found
Returns the address of the Csound audio output buffer.
Enables external software to read audio from Csound after calling csoundPerformBuffer.
Returns the number of samples in Csound's output buffer.
Return pointer to user data pointer for real time audio output.
Return pointer to user data pointer for real time audio input.
Returns the address of the Csound audio input working buffer (spin).
Enables external software to write audio into Csound before calling csoundPerformKsmps.
Returns the address of the Csound audio output working buffer (spout).
Enables external software to read audio from Csound after calling csoundPerformKsmps.
Returns the indicated sample from the Csound audio output working buffer (spout); only ever makes sense after calling csoundPerformKsmps().
The frame and channel must be in bounds relative to ksmps and nchnls.
PUBLIC void csoundSetAudioDeviceListCallback | ( | CSOUND * | csound, |
int(*)(CSOUND *, CS_AUDIODEVICE *list, int isOutput) | audiodevlist__ | ||
) |
Sets a function that is called to obtain a list of audio devices.
This should be set by rtaudio modules and should not be set by hosts. (See csoundGetAudioDevList())
Calling this function with a non-zero 'state' value between csoundCreate() and the start of performance will disable all default handling of sound I/O by the Csound library, allowing the host application to use the spin/spout/input/output buffers directly.
For applications using spin/spout, bufSize should be set to 0. If 'bufSize' is greater than zero, the buffer size (-b) in frames will be set to the integer multiple of ksmps that is nearest to the value specified.
PUBLIC void csoundSetPlayopenCallback | ( | CSOUND * | , |
int(*)(CSOUND *, const csRtAudioParams *parm) | playopen__ | ||
) |
Sets a function to be called by Csound for opening real-time audio playback.
PUBLIC void csoundSetRecopenCallback | ( | CSOUND * | , |
int(*)(CSOUND *, const csRtAudioParams *parm) | recopen_ | ||
) |
Sets a function to be called by Csound for opening real-time audio recording.
Sets the current RT audio module.
Sets a function to be called by Csound for closing real-time audio playback and recording.
PUBLIC void csoundSetRtplayCallback | ( | CSOUND * | , |
void(*)(CSOUND *, const MYFLT *outBuf, int nbytes) | rtplay__ | ||
) |
Sets a function to be called by Csound for performing real-time audio playback.
PUBLIC void csoundSetRtrecordCallback | ( | CSOUND * | , |
int(*)(CSOUND *, MYFLT *inBuf, int nbytes) | rtrecord__ | ||
) |
Sets a function to be called by Csound for performing real-time audio recording.
Sets the audio input working buffer (spin) to the indicated sample this only ever makes sense before calling csoundPerformKsmps().
The frame and channel must be in bounds relative to ksmps and nchnls.