File: sfont_8h-source.html

package info (click to toggle)
fluidsynth 1.0.5-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,844 kB
  • ctags: 3,665
  • sloc: ansic: 22,164; sh: 10,532; xml: 705; makefile: 230
file content (148 lines) | stat: -rw-r--r-- 13,070 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>libfluidsynth: sfont.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6-20040222 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<h1>sfont.h</h1><a href="sfont_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/* FluidSynth - A Software Synthesizer</span>
00002 <span class="comment"> *</span>
00003 <span class="comment"> * Copyright (C) 2003  Peter Hanappe and others.</span>
00004 <span class="comment"> *</span>
00005 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
00006 <span class="comment"> * modify it under the terms of the GNU Library General Public License</span>
00007 <span class="comment"> * as published by the Free Software Foundation; either version 2 of</span>
00008 <span class="comment"> * the License, or (at your option) any later version.</span>
00009 <span class="comment"> *</span>
00010 <span class="comment"> * This library is distributed in the hope that it will be useful, but</span>
00011 <span class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</span>
00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
00013 <span class="comment"> * Library General Public License for more details.</span>
00014 <span class="comment"> *  </span>
00015 <span class="comment"> * You should have received a copy of the GNU Library General Public</span>
00016 <span class="comment"> * License along with this library; if not, write to the Free</span>
00017 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA</span>
00018 <span class="comment"> * 02111-1307, USA</span>
00019 <span class="comment"> */</span>
00020 
00021 <span class="preprocessor">#ifndef _FLUIDSYNTH_SFONT_H</span>
00022 <span class="preprocessor"></span><span class="preprocessor">#define _FLUIDSYNTH_SFONT_H</span>
00023 <span class="preprocessor"></span>
00024 <span class="preprocessor">#ifdef __cplusplus</span>
00025 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
00026 <span class="preprocessor">#endif</span>
00027 <span class="preprocessor"></span>
00028 
00029 
00063   <span class="keyword">enum</span> {
00064     <a class="code" href="sfont_8h.html#a10a7">FLUID_PRESET_SELECTED</a>,
00065     <a class="code" href="sfont_8h.html#a10a8">FLUID_PRESET_UNSELECTED</a>,
00066     <a class="code" href="sfont_8h.html#a10a9">FLUID_SAMPLE_DONE</a>
00067   };
00068 
00069 
00070 <span class="comment">/*</span>
00071 <span class="comment"> * fluid_sfloader_t</span>
00072 <span class="comment"> */</span>
00073 
<a name="l00074"></a><a class="code" href="struct__fluid__sfloader__t.html">00074</a> <span class="keyword">struct </span><a class="code" href="struct__fluid__sfloader__t.html">_fluid_sfloader_t</a> {
<a name="l00076"></a><a class="code" href="struct__fluid__sfloader__t.html#o0">00076</a>   <span class="keywordtype">void</span>* <a class="code" href="struct__fluid__sfloader__t.html#o0">data</a>;
00077 
00081   int (*free)(<a class="code" href="struct__fluid__sfloader__t.html">fluid_sfloader_t</a>* loader);
00082 
00084   <a class="code" href="struct__fluid__sfont__t.html">fluid_sfont_t</a>* (*load)(<a class="code" href="struct__fluid__sfloader__t.html">fluid_sfloader_t</a>* loader, <span class="keyword">const</span> <span class="keywordtype">char</span>* filename);
00085 };
00086 
00087 
00088 <span class="comment">/*</span>
00089 <span class="comment"> * fluid_sfont_t</span>
00090 <span class="comment"> */</span>
00091 
<a name="l00092"></a><a class="code" href="struct__fluid__sfont__t.html">00092</a> <span class="keyword">struct </span><a class="code" href="struct__fluid__sfont__t.html">_fluid_sfont_t</a> {
<a name="l00093"></a><a class="code" href="struct__fluid__sfont__t.html#o0">00093</a>   <span class="keywordtype">void</span>* data;
<a name="l00094"></a><a class="code" href="struct__fluid__sfont__t.html#o1">00094</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>;
00095 
00099   int (*free)(<a class="code" href="struct__fluid__sfont__t.html">fluid_sfont_t</a>* sfont);
00100 
00102   <span class="keywordtype">char</span>* (*get_name)(<a class="code" href="struct__fluid__sfont__t.html">fluid_sfont_t</a>* sfont);
00103 
00107   <a class="code" href="struct__fluid__preset__t.html">fluid_preset_t</a>* (*get_preset)(<a class="code" href="struct__fluid__sfont__t.html">fluid_sfont_t</a>* sfont, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bank, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> prenum);
00108 
00109   void (*iteration_start)(<a class="code" href="struct__fluid__sfont__t.html">fluid_sfont_t</a>* sfont);
00110 
00111   <span class="comment">/* return 0 when no more presets are available, 1 otherwise */</span>
00112   int (*iteration_next)(<a class="code" href="struct__fluid__sfont__t.html">fluid_sfont_t</a>* sfont, <a class="code" href="struct__fluid__preset__t.html">fluid_preset_t</a>* preset);
00113 };
00114 
<a name="l00115"></a><a class="code" href="sfont_8h.html#a0">00115</a> <span class="preprocessor">#define fluid_sfont_get_id(_sf) ((_sf)-&gt;id)</span>
00116 <span class="preprocessor"></span>
00117 
00118 <span class="comment">/*</span>
00119 <span class="comment"> * fluid_preset_t </span>
00120 <span class="comment"> */</span>
00121 
<a name="l00122"></a><a class="code" href="struct__fluid__preset__t.html">00122</a> <span class="keyword">struct </span><a class="code" href="struct__fluid__preset__t.html">_fluid_preset_t</a> {
<a name="l00123"></a><a class="code" href="struct__fluid__preset__t.html#o0">00123</a>   <span class="keywordtype">void</span>* data;
<a name="l00124"></a><a class="code" href="struct__fluid__preset__t.html#o1">00124</a>   <a class="code" href="struct__fluid__sfont__t.html">fluid_sfont_t</a>* <a class="code" href="struct__fluid__preset__t.html#o1">sfont</a>;
00125   int (*free)(<a class="code" href="struct__fluid__preset__t.html">fluid_preset_t</a>* preset);
00126   <span class="keywordtype">char</span>* (*get_name)(<a class="code" href="struct__fluid__preset__t.html">fluid_preset_t</a>* preset);
00127   int (*get_banknum)(<a class="code" href="struct__fluid__preset__t.html">fluid_preset_t</a>* preset);
00128   int (*get_num)(<a class="code" href="struct__fluid__preset__t.html">fluid_preset_t</a>* preset);
00129 
00131   int (*noteon)(<a class="code" href="struct__fluid__preset__t.html">fluid_preset_t</a>* preset, <a class="code" href="types_8h.html#a1">fluid_synth_t</a>* synth, <span class="keywordtype">int</span> chan, <span class="keywordtype">int</span> key, <span class="keywordtype">int</span> vel);
00132 
00135   int (*notify)(<a class="code" href="struct__fluid__preset__t.html">fluid_preset_t</a>* preset, <span class="keywordtype">int</span> reason, <span class="keywordtype">int</span> chan);
00136 };
00137 
00138 
00139 <span class="comment">/*</span>
00140 <span class="comment"> * fluid_sample_t</span>
00141 <span class="comment"> */</span>
00142 
<a name="l00143"></a><a class="code" href="struct__fluid__sample__t.html">00143</a> <span class="keyword">struct </span><a class="code" href="struct__fluid__sample__t.html">_fluid_sample_t</a>
00144 {
<a name="l00145"></a><a class="code" href="struct__fluid__sample__t.html#o0">00145</a>   <span class="keywordtype">char</span> <a class="code" href="struct__fluid__sample__t.html#o0">name</a>[21];
<a name="l00146"></a><a class="code" href="struct__fluid__sample__t.html#o1">00146</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct__fluid__sample__t.html#o1">start</a>;
<a name="l00147"></a><a class="code" href="struct__fluid__sample__t.html#o2">00147</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct__fluid__sample__t.html#o2">end</a>;
<a name="l00148"></a><a class="code" href="struct__fluid__sample__t.html#o3">00148</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct__fluid__sample__t.html#o3">loopstart</a>;
<a name="l00149"></a><a class="code" href="struct__fluid__sample__t.html#o4">00149</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct__fluid__sample__t.html#o4">loopend</a>;
<a name="l00150"></a><a class="code" href="struct__fluid__sample__t.html#o5">00150</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct__fluid__sample__t.html#o5">samplerate</a>;
<a name="l00151"></a><a class="code" href="struct__fluid__sample__t.html#o6">00151</a>   <span class="keywordtype">int</span> <a class="code" href="struct__fluid__sample__t.html#o6">origpitch</a>;
<a name="l00152"></a><a class="code" href="struct__fluid__sample__t.html#o7">00152</a>   <span class="keywordtype">int</span> <a class="code" href="struct__fluid__sample__t.html#o7">pitchadj</a>;
<a name="l00153"></a><a class="code" href="struct__fluid__sample__t.html#o8">00153</a>   <span class="keywordtype">int</span> <a class="code" href="struct__fluid__sample__t.html#o8">sampletype</a>;
<a name="l00154"></a><a class="code" href="struct__fluid__sample__t.html#o9">00154</a>   <span class="keywordtype">int</span> <a class="code" href="struct__fluid__sample__t.html#o9">valid</a>;
<a name="l00155"></a><a class="code" href="struct__fluid__sample__t.html#o10">00155</a>   <span class="keywordtype">short</span>* data;
00156 
00160   <span class="comment">/* Set this to zero, when submitting a new sample. */</span>
<a name="l00161"></a><a class="code" href="struct__fluid__sample__t.html#o11">00161</a>   <span class="keywordtype">int</span> <a class="code" href="struct__fluid__sample__t.html#o11">amplitude_that_reaches_noise_floor_is_valid</a>; 
<a name="l00162"></a><a class="code" href="struct__fluid__sample__t.html#o12">00162</a>   <span class="keywordtype">double</span> <a class="code" href="struct__fluid__sample__t.html#o12">amplitude_that_reaches_noise_floor</a>;
00163 
<a name="l00165"></a><a class="code" href="struct__fluid__sample__t.html#o13">00165</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct__fluid__sample__t.html#o13">refcount</a>;
00166 
00169   int (*notify)(<a class="code" href="struct__fluid__sample__t.html">fluid_sample_t</a>* sample, <span class="keywordtype">int</span> reason);
00170 
<a name="l00172"></a><a class="code" href="struct__fluid__sample__t.html#o15">00172</a>   <span class="keywordtype">void</span>* <a class="code" href="struct__fluid__sample__t.html#o15">userdata</a>;
00173 };
00174 
00175 
<a name="l00176"></a><a class="code" href="sfont_8h.html#a1">00176</a> <span class="preprocessor">#define fluid_sample_refcount(_sample) ((_sample)-&gt;refcount)</span>
00177 <span class="preprocessor"></span>
00178 
<a name="l00181"></a><a class="code" href="sfont_8h.html#a2">00181</a> <span class="preprocessor">#define FLUID_SAMPLETYPE_MONO   1</span>
<a name="l00182"></a><a class="code" href="sfont_8h.html#a3">00182</a> <span class="preprocessor"></span><span class="preprocessor">#define FLUID_SAMPLETYPE_RIGHT  2</span>
<a name="l00183"></a><a class="code" href="sfont_8h.html#a4">00183</a> <span class="preprocessor"></span><span class="preprocessor">#define FLUID_SAMPLETYPE_LEFT   4</span>
<a name="l00184"></a><a class="code" href="sfont_8h.html#a5">00184</a> <span class="preprocessor"></span><span class="preprocessor">#define FLUID_SAMPLETYPE_LINKED 8</span>
<a name="l00185"></a><a class="code" href="sfont_8h.html#a6">00185</a> <span class="preprocessor"></span><span class="preprocessor">#define FLUID_SAMPLETYPE_ROM    0x8000</span>
00186 <span class="preprocessor"></span>
00187 
00188 
00189 <span class="preprocessor">#ifdef __cplusplus</span>
00190 <span class="preprocessor"></span>}
00191 <span class="preprocessor">#endif</span>
00192 <span class="preprocessor"></span>
00193 <span class="preprocessor">#endif </span><span class="comment">/* _FLUIDSYNTH_SFONT_H */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Aug 17 14:37:46 2004 for libfluidsynth by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.6-20040222 </small></address>
</body>
</html>