fix incorrect assumption, minor refactoring
[sdl_omap.git] / docs / html / sdlbuildaudiocvt.html
... / ...
CommitLineData
1<HTML
2><HEAD
3><TITLE
4>SDL_BuildAudioCVT</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
8"><LINK
9REL="HOME"
10TITLE="SDL Library Documentation"
11HREF="index.html"><LINK
12REL="UP"
13TITLE="Audio"
14HREF="audio.html"><LINK
15REL="PREVIOUS"
16TITLE="SDL_AudioCVT"
17HREF="sdlaudiocvt.html"><LINK
18REL="NEXT"
19TITLE="SDL_ConvertAudio"
20HREF="sdlconvertaudio.html"></HEAD
21><BODY
22CLASS="REFENTRY"
23BGCOLOR="#FFF8DC"
24TEXT="#000000"
25LINK="#0000ee"
26VLINK="#551a8b"
27ALINK="#ff0000"
28><DIV
29CLASS="NAVHEADER"
30><TABLE
31SUMMARY="Header navigation table"
32WIDTH="100%"
33BORDER="0"
34CELLPADDING="0"
35CELLSPACING="0"
36><TR
37><TH
38COLSPAN="3"
39ALIGN="center"
40>SDL Library Documentation</TH
41></TR
42><TR
43><TD
44WIDTH="10%"
45ALIGN="left"
46VALIGN="bottom"
47><A
48HREF="sdlaudiocvt.html"
49ACCESSKEY="P"
50>Prev</A
51></TD
52><TD
53WIDTH="80%"
54ALIGN="center"
55VALIGN="bottom"
56></TD
57><TD
58WIDTH="10%"
59ALIGN="right"
60VALIGN="bottom"
61><A
62HREF="sdlconvertaudio.html"
63ACCESSKEY="N"
64>Next</A
65></TD
66></TR
67></TABLE
68><HR
69ALIGN="LEFT"
70WIDTH="100%"></DIV
71><H1
72><A
73NAME="SDLBUILDAUDIOCVT"
74></A
75>SDL_BuildAudioCVT</H1
76><DIV
77CLASS="REFNAMEDIV"
78><A
79NAME="AEN7002"
80></A
81><H2
82>Name</H2
83>SDL_BuildAudioCVT&nbsp;--&nbsp;Initializes a SDL_AudioCVT structure for conversion</DIV
84><DIV
85CLASS="REFSYNOPSISDIV"
86><A
87NAME="AEN7005"
88></A
89><H2
90>Synopsis</H2
91><DIV
92CLASS="FUNCSYNOPSIS"
93><A
94NAME="AEN7006"
95></A
96><P
97></P
98><PRE
99CLASS="FUNCSYNOPSISINFO"
100>#include "SDL.h"</PRE
101><P
102><CODE
103><CODE
104CLASS="FUNCDEF"
105>int <B
106CLASS="FSFUNC"
107>SDL_BuildAudioCVT</B
108></CODE
109>(SDL_AudioCVT *cvt, Uint16 src_format, Uint8 src_channels, int src_rate, Uint16 dst_format, Uint8 dst_channels, int dst_rate);</CODE
110></P
111><P
112></P
113></DIV
114></DIV
115><DIV
116CLASS="REFSECT1"
117><A
118NAME="AEN7012"
119></A
120><H2
121>Description</H2
122><P
123>Before an <A
124HREF="sdlaudiocvt.html"
125><SPAN
126CLASS="STRUCTNAME"
127>SDL_AudioCVT</SPAN
128></A
129> structure can be used to convert audio data it must be initialized with source and destination information. </P
130><P
131><TT
132CLASS="PARAMETER"
133><I
134>src_format</I
135></TT
136> and <TT
137CLASS="PARAMETER"
138><I
139>dst_format</I
140></TT
141> are the source and destination format of the conversion. (For information on audio formats see <A
142HREF="sdlaudiospec.html"
143><SPAN
144CLASS="STRUCTNAME"
145> SDL_AudioSpec</SPAN
146></A
147>). <TT
148CLASS="PARAMETER"
149><I
150>src_channels</I
151></TT
152> and <TT
153CLASS="PARAMETER"
154><I
155>dst_channels</I
156></TT
157> are the number of channels in the source and destination formats. Finally, <TT
158CLASS="PARAMETER"
159><I
160>src_rate</I
161></TT
162> and <TT
163CLASS="PARAMETER"
164><I
165>dst_rate</I
166></TT
167> are the frequency or samples-per-second of the source and destination formats. Once again, see <A
168HREF="sdlaudiospec.html"
169><SPAN
170CLASS="STRUCTNAME"
171>SDL_AudioSpec</SPAN
172></A
173>.</P
174></DIV
175><DIV
176CLASS="REFSECT1"
177><A
178NAME="AEN7028"
179></A
180><H2
181>Return Values</H2
182><P
183>Returns <SPAN
184CLASS="RETURNVALUE"
185>-1</SPAN
186> if the filter could not be built or 1 if it could.</P
187></DIV
188><DIV
189CLASS="REFSECT1"
190><A
191NAME="AEN7032"
192></A
193><H2
194>Examples</H2
195><P
196>See <A
197HREF="sdlconvertaudio.html"
198><TT
199CLASS="FUNCTION"
200>SDL_ConvertAudio</TT
201></A
202>.</P
203></DIV
204><DIV
205CLASS="REFSECT1"
206><A
207NAME="AEN7037"
208></A
209><H2
210>See Also</H2
211><P
212><A
213HREF="sdlconvertaudio.html"
214><TT
215CLASS="FUNCTION"
216>SDL_ConvertAudio</TT
217></A
218>,
219<A
220HREF="sdlaudiocvt.html"
221><TT
222CLASS="FUNCTION"
223>SDL_AudioCVT</TT
224></A
225></P
226></DIV
227><DIV
228CLASS="NAVFOOTER"
229><HR
230ALIGN="LEFT"
231WIDTH="100%"><TABLE
232SUMMARY="Footer navigation table"
233WIDTH="100%"
234BORDER="0"
235CELLPADDING="0"
236CELLSPACING="0"
237><TR
238><TD
239WIDTH="33%"
240ALIGN="left"
241VALIGN="top"
242><A
243HREF="sdlaudiocvt.html"
244ACCESSKEY="P"
245>Prev</A
246></TD
247><TD
248WIDTH="34%"
249ALIGN="center"
250VALIGN="top"
251><A
252HREF="index.html"
253ACCESSKEY="H"
254>Home</A
255></TD
256><TD
257WIDTH="33%"
258ALIGN="right"
259VALIGN="top"
260><A
261HREF="sdlconvertaudio.html"
262ACCESSKEY="N"
263>Next</A
264></TD
265></TR
266><TR
267><TD
268WIDTH="33%"
269ALIGN="left"
270VALIGN="top"
271>SDL_AudioCVT</TD
272><TD
273WIDTH="34%"
274ALIGN="center"
275VALIGN="top"
276><A
277HREF="audio.html"
278ACCESSKEY="U"
279>Up</A
280></TD
281><TD
282WIDTH="33%"
283ALIGN="right"
284VALIGN="top"
285>SDL_ConvertAudio</TD
286></TR
287></TABLE
288></DIV
289></BODY
290></HTML
291>