Csound API 6.09
Loading...
Searching...
No Matches
Messages and Text

Functions

PUBLIC CS_PRINTF2 void csoundMessage (CSOUND *, const char *format,...)
 Displays an informational message.
PUBLIC CS_PRINTF3 void csoundMessageS (CSOUND *, int attr, const char *format,...)
 Print message with special attributes (see msg_attr.h for the list of available attributes).
PUBLIC void csoundMessageV (CSOUND *, int attr, const char *format, va_list args)
PUBLIC void csoundSetDefaultMessageCallback (void(*csoundMessageCallback_)(CSOUND *, int attr, const char *format, va_list valist))
PUBLIC void csoundSetMessageCallback (CSOUND *, void(*csoundMessageCallback_)(CSOUND *, int attr, const char *format, va_list valist))
 Sets a function to be called by Csound to print an informational message.
PUBLIC void csoundSetMessageStringCallback (CSOUND *csound, void(*csoundMessageStrCallback)(CSOUND *csound, int attr, const char *str))
 Sets an alternative function to be called by Csound to print an informational message, using a less granular signature.
PUBLIC int csoundGetMessageLevel (CSOUND *)
 Returns the Csound message level (from 0 to 231).
PUBLIC void csoundSetMessageLevel (CSOUND *, int messageLevel)
 Sets the Csound message level (from 0 to 231).
PUBLIC void csoundCreateMessageBuffer (CSOUND *csound, int toStdOut)
 Creates a buffer for storing messages printed by Csound.
PUBLIC const char * csoundGetFirstMessage (CSOUND *csound)
 Returns the first message from the buffer.
PUBLIC int csoundGetFirstMessageAttr (CSOUND *csound)
 Returns the attribute parameter (see msg_attr.h) of the first message in the buffer.
PUBLIC void csoundPopFirstMessage (CSOUND *csound)
 Removes the first message from the buffer.
PUBLIC int csoundGetMessageCnt (CSOUND *csound)
 Returns the number of pending messages in the buffer.
void PUBLIC csoundDestroyMessageBuffer (CSOUND *csound)
 Releases all memory used by the message buffer.

Detailed Description

Function Documentation

◆ csoundCreateMessageBuffer()

PUBLIC void csoundCreateMessageBuffer ( CSOUND * csound,
int toStdOut )

Creates a buffer for storing messages printed by Csound.

Should be called after creating a Csound instance andthe buffer can be freed by calling csoundDestroyMessageBuffer() before deleting the Csound instance. You will generally want to call csoundCleanup() to make sure the last messages are flushed to the message buffer before destroying Csound. If 'toStdOut' is non-zero, the messages are also printed to stdout and stderr (depending on the type of the message), in addition to being stored in the buffer. Using the message buffer ties up the internal message callback, so csoundSetMessageCallback should not be called after creating the message buffer.

References PUBLIC.

◆ csoundDestroyMessageBuffer()

void PUBLIC csoundDestroyMessageBuffer ( CSOUND * csound)

Releases all memory used by the message buffer.

References PUBLIC.

◆ csoundGetFirstMessage()

PUBLIC const char * csoundGetFirstMessage ( CSOUND * csound)

Returns the first message from the buffer.

References PUBLIC.

◆ csoundGetFirstMessageAttr()

PUBLIC int csoundGetFirstMessageAttr ( CSOUND * csound)

Returns the attribute parameter (see msg_attr.h) of the first message in the buffer.

References PUBLIC.

◆ csoundGetMessageCnt()

PUBLIC int csoundGetMessageCnt ( CSOUND * csound)

Returns the number of pending messages in the buffer.

References PUBLIC.

◆ csoundGetMessageLevel()

PUBLIC int csoundGetMessageLevel ( CSOUND * )

Returns the Csound message level (from 0 to 231).

References PUBLIC.

◆ csoundMessage()

PUBLIC CS_PRINTF2 void csoundMessage ( CSOUND * ,
const char * format,
... )

Displays an informational message.

References PUBLIC.

◆ csoundMessageS()

PUBLIC CS_PRINTF3 void csoundMessageS ( CSOUND * ,
int attr,
const char * format,
... )

Print message with special attributes (see msg_attr.h for the list of available attributes).

With attr=0, csoundMessageS() is identical to csoundMessage().

References PUBLIC.

◆ csoundMessageV()

PUBLIC void csoundMessageV ( CSOUND * ,
int attr,
const char * format,
va_list args )

References PUBLIC.

◆ csoundPopFirstMessage()

PUBLIC void csoundPopFirstMessage ( CSOUND * csound)

Removes the first message from the buffer.

References PUBLIC.

◆ csoundSetDefaultMessageCallback()

PUBLIC void csoundSetDefaultMessageCallback ( void(* csoundMessageCallback_ )(CSOUND *, int attr, const char *format, va_list valist))

References PUBLIC.

◆ csoundSetMessageCallback()

PUBLIC void csoundSetMessageCallback ( CSOUND * ,
void(* csoundMessageCallback_ )(CSOUND *, int attr, const char *format, va_list valist) )

Sets a function to be called by Csound to print an informational message.

This callback is never called on –realtime mode

References PUBLIC.

◆ csoundSetMessageLevel()

PUBLIC void csoundSetMessageLevel ( CSOUND * ,
int messageLevel )

Sets the Csound message level (from 0 to 231).

References PUBLIC.

◆ csoundSetMessageStringCallback()

PUBLIC void csoundSetMessageStringCallback ( CSOUND * csound,
void(* csoundMessageStrCallback )(CSOUND *csound, int attr, const char *str) )

Sets an alternative function to be called by Csound to print an informational message, using a less granular signature.

This callback can be set for –realtime mode. This callback is cleared after csoundReset

References PUBLIC.