WildMidi_GetOutput(3)

WildMidi_GetOutput3

Retrieve raw audio data

Usage

#include <wildmidi_lib.h>

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

Library

libWildMidi

Overview

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) or WildMidi_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.

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.

Releases

9 releases since Debian 6.0 (Squeeze); the text changed 3 times.

  1. 6.0
  2. 7
  3. 8
  4. 9–Arch

Author

Chris Ison <[email protected]> Bret Curtis <[email protected]>

From wildmidi 0.5.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.