WildMidi_GetOutput - Man Page

retrieve raw audio data




#include <wildmidi_lib.h>

int WildMidi_GetOutput (midi *handle, int8_t *buffer, uint32_t size);


Places size bytes of audio data from a handle, previously opened by WildMidi_Open(3) or WildMidi_OpenBuffer(3), into a buffer pointer to by buffer.

buffer must be at least size bytes, with size being a multiple of 4 as the data is stored in 16bit interleaved stereo format.


The identifier obtained from opening a midi file with WildMidi_Open(3) or WildMidi_OpenBuffer(3)


The location supplied by the calling program where libWildMidi is to store the audio data. The audio data will be stored as signed 16bit interleaved stereo in native-endian byte order.


The size of the buffer in bytes. Since libWildMidi processes the audio in 16bit interleaved stereo format, this value needs to be a multiple of 4.

Return Value

Returns -1 on error along with an error message sent to stderr, 0 when there is no more audio data, otherwise the number of bytes of audio data written to buffer.

NOTE: if the return value is less than the size you gave, this does not denote an error, it simply means the lib reached the end of the midi before it could fill the buffer.

See Also

WildMidi_GetVersion(3), WildMidi_Init(3), WildMidi_MasterVolume(3), WildMidi_Open(3), WildMidi_OpenBuffer(3), WildMidi_SetOption(3), WildMidi_GetMidiOutput(3), WildMidi_GetInfo(3), WildMidi_FastSeek(3), WildMidi_Close(3), WildMidi_Shutdown(3), wildmidi.cfg(5)


Chris Ison <chrisisonwildcode@gmail.com> Bret Curtis <psi29a@gmail.com>

Referenced By

WildMidi_ClearError(3), WildMidi_Close(3), WildMidi_ConvertBufferToMidi(3), WildMidi_ConvertToMidi(3), WildMidi_FastSeek(3), WildMidi_GetError(3), WildMidi_GetInfo(3), WildMidi_GetLyric(3), WildMidi_GetMidiOutput(3), WildMidi_GetString(3), WildMidi_GetVersion(3), WildMidi_Init(3), WildMidi_InitVIO(3), WildMidi_MasterVolume(3), WildMidi_Open(3), WildMidi_OpenBuffer(3), WildMidi_SetCvtOption(3), WildMidi_SetOption(3), WildMidi_Shutdown(3), WildMidi_SongSeek(3).

10 March 2016 WildMidi Programmer's Manual