Csound API  6.18
General Input/Output

Setting the device or filename name for Csound input and output. More...

Functions

PUBLIC const char * csoundGetOutputName (CSOUND *)
 Returns the audio output name (-o). More...
 
PUBLIC const char * csoundGetInputName (CSOUND *)
 Returns the audio input name (-i). More...
 
PUBLIC void csoundSetOutput (CSOUND *csound, const char *name, const char *type, const char *format)
 Set output destination, type and format type can be one of "wav","aiff", "au","raw", "paf", "svx", "nist", "voc", "ircam","w64","mat4", "mat5", "pvf","xi", "htk","sds","avr","wavex","sd2", "flac", "caf","wve","ogg","mpc2k","rf64", or NULL (use default or realtime IO). More...
 
PUBLIC void csoundGetOutputFormat (CSOUND *csound, char *type, char *format)
 Get output type and format. More...
 
PUBLIC void csoundSetInput (CSOUND *csound, const char *name)
 Set input source. More...
 
PUBLIC void csoundSetMIDIInput (CSOUND *csound, const char *name)
 Set MIDI input device name/number. More...
 
PUBLIC void csoundSetMIDIFileInput (CSOUND *csound, const char *name)
 Set MIDI file input name. More...
 
PUBLIC void csoundSetMIDIOutput (CSOUND *csound, const char *name)
 Set MIDI output device name/number. More...
 
PUBLIC void csoundSetMIDIFileOutput (CSOUND *csound, const char *name)
 Set MIDI file utput name. More...
 
PUBLIC void csoundSetFileOpenCallback (CSOUND *p, void(*func)(CSOUND *, const char *, int, int, int))
 Sets an external callback for receiving notices whenever Csound opens a file. More...
 

Detailed Description

Setting the device or filename name for Csound input and output.

These functions are used to set the input and output command line flags that apply to both input and output of audio and MIDI. See command line flags -o, -i, -M and -Q in the Csound Reference Manual.

Function Documentation

◆ csoundGetInputName()

PUBLIC const char* csoundGetInputName ( CSOUND )

Returns the audio input name (-i).

◆ csoundGetOutputFormat()

PUBLIC void csoundGetOutputFormat ( CSOUND csound,
char *  type,
char *  format 
)

Get output type and format.

type should have space for at least 5 chars excluding termination, and format should have space for at least 7 chars. On return, these will hold the current values for these parameters.

◆ csoundGetOutputName()

PUBLIC const char* csoundGetOutputName ( CSOUND )

Returns the audio output name (-o).

◆ csoundSetFileOpenCallback()

PUBLIC void csoundSetFileOpenCallback ( CSOUND p,
void(*)(CSOUND *, const char *, int, int, int)  func 
)

Sets an external callback for receiving notices whenever Csound opens a file.

The callback is made after the file is successfully opened. The following information is passed to the callback: char* pathname of the file; either full or relative to current dir int a file type code from the enumeration CSOUND_FILETYPES int 1 if Csound is writing the file, 0 if reading int 1 if a temporary file that Csound will delete; 0 if not

Pass NULL to disable the callback. This callback is retained after a csoundReset() call.

◆ csoundSetInput()

PUBLIC void csoundSetInput ( CSOUND csound,
const char *  name 
)

Set input source.

◆ csoundSetMIDIFileInput()

PUBLIC void csoundSetMIDIFileInput ( CSOUND csound,
const char *  name 
)

Set MIDI file input name.

◆ csoundSetMIDIFileOutput()

PUBLIC void csoundSetMIDIFileOutput ( CSOUND csound,
const char *  name 
)

Set MIDI file utput name.

◆ csoundSetMIDIInput()

PUBLIC void csoundSetMIDIInput ( CSOUND csound,
const char *  name 
)

Set MIDI input device name/number.

◆ csoundSetMIDIOutput()

PUBLIC void csoundSetMIDIOutput ( CSOUND csound,
const char *  name 
)

Set MIDI output device name/number.

◆ csoundSetOutput()

PUBLIC void csoundSetOutput ( CSOUND csound,
const char *  name,
const char *  type,
const char *  format 
)

Set output destination, type and format type can be one of "wav","aiff", "au","raw", "paf", "svx", "nist", "voc", "ircam","w64","mat4", "mat5", "pvf","xi", "htk","sds","avr","wavex","sd2", "flac", "caf","wve","ogg","mpc2k","rf64", or NULL (use default or realtime IO).

format can be one of "alaw", "schar", "uchar", "float", "double", "long", "short", "ulaw", "24bit", "vorbis", or NULL (use default or realtime IO). For RT audio, use device_id from CS_AUDIODEVICE for a given audio device.