1WildMidi_GetInfo(3) WildMidi Programmer's Manual WildMidi_GetInfo(3)
2
3
4
6 WildMidi_GetInfo - get information on a midi
7
9 libWildMidi
10
12 #include <wildmidi_lib.h>
13
14 struct _WM_Info *WildMidi_GetInfo (midi *handle);
15
17 Obtains information allowing you to determin song position, current
18 options, and any copyright information for
19
20 handle The indentifier obtained from opening a midi file with Wild‐
21 Midi_Open(3) or WildMidi_OpenBuffer(3)
22
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 unsigned long int current_sample;
31 unsigned long int approx_total_samples;
32 unsigned short int mixer_options;
33 };
34
35 copyright
36 A pointer to a \0 terminated string containing any copyright
37 MIDI events found while processing the MIDI file handle refers
38 to. If more than one copyright event was found then each one is
39 separated by \n
40
41 If copyright is NULL then no copyright MIDI events were found.
42
43 current_sample
44 This is the number of stereo samples libWildMidi has processed
45 for the MIDI file refered to by handle. You can use this value
46 to determin the current playing time by dividing this value by
47 the rate given when libWildMidi was initialized by Wild‐
48 Midi_Init(3).
49
50 approx_total_samples
51 This is the total number of stereo samples libWildMidi expects
52 to process. This can be used to obtain the total playing time by
53 dividing this value by the rate given when libWildMidi was ini‐
54 tialized by WildMidi_Init(3). Also when you divide current_sam‐
55 ple by this value and multiplying by 100, you have the percent‐
56 age currently processed.
57
58 mixer_options
59
60 WM_MO_LOG_VOLUME
61 Using curved volume settings instead of linear ones.
62
63 WM_MO_ENHANCED_RESAMPLING
64 The enhanced resampler is active
65
66 WM_MO_REVERB
67 Reverb is being added to the final output.
68
70 WildMidi_GetString(3), WildMidi_Init(3), WildMidi_MasterVolume(3),
71 WildMidi_Open(3), WildMidi_OpenBuffer(3), WildMidi_SetOption(3), Wild‐
72 Midi_GetOutput(3), WildMidi_FastSeek(3), WildMidi_Close(3), Wild‐
73 Midi_Shutdown(3), wildmidi(1), wildmidi.cfg(5)
74
76 Chris Ison <wildcode@users.sourceforge.net>
77
79 Copyright (C) Chris Ison 2001-2010
80
81 This file is part of WildMIDI.
82
83 WildMIDI is free software: you can redistribute and/or modify the
84 player under the terms of the GNU General Public License and you can
85 redistribute and/or modify the library under the terms of the GNU
86 Lesser General Public License as published by the Free Software Founda‐
87 tion, either version 3 of the licenses, or(at your option) any later
88 version.
89
90 WildMIDI is distributed in the hope that it will be useful, but WITHOUT
91 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
92 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
93 and the GNU Lesser General Public License for more details.
94
95 You should have received a copy of the GNU General Public License and
96 the GNU Lesser General Public License along with WildMIDI. If not, see
97 <http://www.gnu.org/licenses/>.
98
99 This manpage is licensed under the Creative Commons Attribution-Share
100 Alike 3.0 Unported License. To view a copy of this license, visit
101 http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Cre‐
102 ative Commons, 171 Second Street, Suite 300, San Francisco, California,
103 94105, USA.
104
105 05 June 2010 WildMidi_GetInfo(3)