1WildMidi_GetInfo(3)      WildMidi Programmer's Manual      WildMidi_GetInfo(3)
2
3
4

NAME

6       WildMidi_GetInfo - get information on a midi
7

LIBRARY

9       libWildMidi
10

SYNOPSIS

12       #include <wildmidi_lib.h>
13
14       struct _WM_Info *WildMidi_GetInfo (midi *handle);
15

DESCRIPTION

17       Obtains  information  allowing  you to determine song position, current
18       options, and any copyright information.
19
20       handle The identifier obtained from opening  a  midi  file  with  Wild‐
21              Midi_Open(3) or WildMidi_OpenBuffer(3)
22

RETURN VALUE

24       On error returns NULL with an error message displayed to stderr.
25
26       Otherwise returns a pointer to a struct containing the information.
27
28       struct _WM_Info {
29          char *copyright;
30          uint32_t current_sample;
31          uint32_t approx_total_samples;
32          uint32_t total_midi_time;
33          uint16_t mixer_options;
34          uint32_t total_midi_time;
35       };
36
37       copyright
38              A  pointer  to  a  \0 terminated string containing any copyright
39              MIDI events found while processing the MIDI file  handle  refers
40              to.  If more than one copyright event was found then each one is
41              separated by \n
42
43       If copyright is NULL then no copyright MIDI events were found.
44
45       current_sample
46              This is the number of stereo samples libWildMidi  has  processed
47              for  the MIDI file referred to by handle. You can use this value
48              to determine the current playing time by dividing this value  by
49              the  rate  given  when  libWildMidi  was  initialized  by  Wild‐
50              Midi_Init(3).
51
52       approx_total_samples
53              This is the total number of stereo samples  libWildMidi  expects
54              to process. This can be used to obtain the total playing time by
55              dividing this value by the rate given when libWildMidi was  ini‐
56              tialized  by WildMidi_Init(3). Also when you divide current_sam‐
57              ple by this value and multiplying by 100, you have the  percent‐
58              age currently processed.
59
60       total_midi_time
61              This  is  the total time of MIDI events in 1/1000's of a second.
62              It differs from approx_total_samples in that it only states  the
63              total  time  within the MIDI file and does not take into account
64              the extra bit of time to finish playing sampling smoothly.
65
66       mixer_options
67
68              WM_MO_LOG_VOLUME
69                     Using curved volume settings instead of linear ones.
70
71              WM_MO_ENHANCED_RESAMPLING
72                     The enhanced resampler is active
73
74              WM_MO_REVERB
75                     Reverb is being added to the final output.
76

SEE ALSO

78       WildMidi_GetVersion(3),   WildMidi_Init(3),   WildMidi_MasterVolume(3),
79       WildMidi_Open(3),  WildMidi_OpenBuffer(3), WildMidi_SetOption(3), Wild‐
80       Midi_GetOutput(3),   WildMidi_GetMidiOutput(3),   WildMidi_FastSeek(3),
81       WildMidi_Close(3), WildMidi_Shutdown(3), wildmidi.cfg(5)
82

AUTHOR

84       Chris Ison <chrisisonwildcode@gmail.com> Bret Curtis <psi29a@gmail.com>
85
87       Copyright (C) WildMidi Developers 2001-2016
88
89       This file is part of WildMIDI.
90
91       WildMIDI  is  free  software:  you  can  redistribute and/or modify the
92       player under the terms of the GNU General Public License  and  you  can
93       redistribute  and/or  modify  the  library  under  the terms of the GNU
94       Lesser General Public License as published by the Free Software Founda‐
95       tion,  either  version  3 of the licenses, or(at your option) any later
96       version.
97
98       WildMIDI is distributed in the hope that it will be useful, but WITHOUT
99       ANY  WARRANTY;  without even the implied warranty of MERCHANTABILITY or
100       FITNESS FOR A PARTICULAR PURPOSE. See the GNU  General  Public  License
101       and the GNU Lesser General Public License for more details.
102
103       You  should  have received a copy of the GNU General Public License and
104       the GNU Lesser General Public License along with WildMIDI. If not,  see
105       <http://www.gnu.org/licenses/>.
106
107       This  manpage  is licensed under the Creative Commons Attribution-Share
108       Alike 3.0 Unported License. To view  a  copy  of  this  license,  visit
109       http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Cre‐
110       ative Commons, 171 Second Street, Suite 300, San Francisco, California,
111       94105, USA.
112
113                                 10 March 2016             WildMidi_GetInfo(3)
Impressum