1WildMidi_GetOutput(3) WildMidi Programmer's Manual WildMidi_GetOutput(3)
2
3
4
6 WildMidi_GetOutput - retrieve raw audio data
7
9 libWildMidi
10
12 #include <wildmidi_lib.h>
13
14 int WildMidi_GetOutput (midi *handle, int8_t *buffer, uint32_t size);
15
17 Places size bytes of audio data from a handle, previously opened by
18 WildMidi_Open(3) or WildMidi_OpenBuffer(3), into a buffer pointer to by
19 buffer.
20
21 buffer must be at least size bytes, with size being a multiple of 4 as
22 the data is stored in 16bit interleaved stereo format.
23
24 handle The identifier obtained from opening a midi file with Wild‐
25 Midi_Open(3) or WildMidi_OpenBuffer(3)
26
27 buffer The location supplied by the calling program where libWildMidi
28 is to store the audio data. The audio data will be stored as
29 signed 16bit interleaved stereo in native-endian byte order.
30
31 size The size of the buffer in bytes. Since libWildMidi processes the
32 audio in 16bit interleaved stereo format, this value needs to be
33 a multiple of 4.
34
36 Returns -1 on error along with an error message sent to stderr, 0 when
37 there is no more audio data, otherwise the number of bytes of audio
38 data written to buffer.
39
40 NOTE: if the return value is less than the size you gave, this does not
41 denote an error, it simply means the lib reached the end of the midi
42 before it could fill the buffer.
43
45 WildMidi_GetVersion(3), WildMidi_Init(3), WildMidi_MasterVolume(3),
46 WildMidi_Open(3), WildMidi_OpenBuffer(3), WildMidi_SetOption(3), Wild‐
47 Midi_GetMidiOutput(3), WildMidi_GetInfo(3), WildMidi_FastSeek(3), Wild‐
48 Midi_Close(3), WildMidi_Shutdown(3), wildmidi.cfg(5)
49
51 Chris Ison <chrisisonwildcode@gmail.com> Bret Curtis <psi29a@gmail.com>
52
54 Copyright (C) WildMidi Developers 2001-2016
55
56 This file is part of WildMIDI.
57
58 WildMIDI is free software: you can redistribute and/or modify the
59 player under the terms of the GNU General Public License and you can
60 redistribute and/or modify the library under the terms of the GNU
61 Lesser General Public License as published by the Free Software Founda‐
62 tion, either version 3 of the licenses, or(at your option) any later
63 version.
64
65 WildMIDI is distributed in the hope that it will be useful, but WITHOUT
66 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
67 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
68 and the GNU Lesser General Public License for more details.
69
70 You should have received a copy of the GNU General Public License and
71 the GNU Lesser General Public License along with WildMIDI. If not, see
72 <http://www.gnu.org/licenses/>.
73
74 This manpage is licensed under the Creative Commons Attribution-Share
75 Alike 3.0 Unported License. To view a copy of this license, visit
76 http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Cre‐
77 ative Commons, 171 Second Street, Suite 300, San Francisco, California,
78 94105, USA.
79
80 10 March 2016 WildMidi_GetOutput(3)