logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

WildMidi_GetOutput - retrieve raw audio data

Author

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

Description

       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.

       handle The identifier obtained from opening a midi file with WildMidi_Open(3) orWildMidi_OpenBuffer(3)

       buffer 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.

       size   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.

Library

libWildMidi

Name

       WildMidi_GetOutput - retrieve raw audio data

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)

Synopsis

#include<wildmidi_lib.h>intWildMidi_GetOutput(midi*handle,int8_t*buffer,uint32_tsize);

See Also