comparison docs/html/sdlopenaudio.html @ 181:e5bc29de3f0a

Updated from the SDL Documentation Project
author Sam Lantinga <slouken@libsdl.org>
date Fri, 14 Sep 2001 02:41:09 +0000
parents 55f1f1b3e27d
children 355632dca928
comparison
equal deleted inserted replaced
180:578815880307 181:e5bc29de3f0a
71 >SDL_OpenAudio</A 71 >SDL_OpenAudio</A
72 ></H1 72 ></H1
73 ><DIV 73 ><DIV
74 CLASS="REFNAMEDIV" 74 CLASS="REFNAMEDIV"
75 ><A 75 ><A
76 NAME="AEN6103" 76 NAME="AEN6262"
77 ></A 77 ></A
78 ><H2 78 ><H2
79 >Name</H2 79 >Name</H2
80 >SDL_OpenAudio&nbsp;--&nbsp;Opens the audio device with the desired parameters.</DIV 80 >SDL_OpenAudio&nbsp;--&nbsp;Opens the audio device with the desired parameters.</DIV
81 ><DIV 81 ><DIV
82 CLASS="REFSYNOPSISDIV" 82 CLASS="REFSYNOPSISDIV"
83 ><A 83 ><A
84 NAME="AEN6106" 84 NAME="AEN6265"
85 ></A 85 ></A
86 ><H2 86 ><H2
87 >Synopsis</H2 87 >Synopsis</H2
88 ><DIV 88 ><DIV
89 CLASS="FUNCSYNOPSIS" 89 CLASS="FUNCSYNOPSIS"
90 ><A 90 ><A
91 NAME="AEN6107" 91 NAME="AEN6266"
92 ></A 92 ></A
93 ><P 93 ><P
94 ></P 94 ></P
95 ><PRE 95 ><PRE
96 CLASS="FUNCSYNOPSISINFO" 96 CLASS="FUNCSYNOPSISINFO"
110 ></DIV 110 ></DIV
111 ></DIV 111 ></DIV
112 ><DIV 112 ><DIV
113 CLASS="REFSECT1" 113 CLASS="REFSECT1"
114 ><A 114 ><A
115 NAME="AEN6113" 115 NAME="AEN6272"
116 ></A 116 ></A
117 ><H2 117 ><H2
118 >Description</H2 118 >Description</H2
119 ><P 119 ><P
120 >This function opens the audio device with the <TT 120 >This function opens the audio device with the <TT
416 > of the audio buffer, you should allocate any local mixing buffers after you open the audio device.</P 416 > of the audio buffer, you should allocate any local mixing buffers after you open the audio device.</P
417 ></DIV 417 ></DIV
418 ><DIV 418 ><DIV
419 CLASS="REFSECT1" 419 CLASS="REFSECT1"
420 ><A 420 ><A
421 NAME="AEN6200" 421 NAME="AEN6359"
422 ></A 422 ></A
423 ><H2 423 ><H2
424 >Examples</H2 424 >Examples</H2
425 ><PRE 425 ><PRE
426 CLASS="PROGRAMLISTING" 426 CLASS="PROGRAMLISTING"
440 /* 22050Hz - FM Radio quality */ 440 /* 22050Hz - FM Radio quality */
441 desired-&#62;freq=22050; 441 desired-&#62;freq=22050;
442 442
443 /* 16-bit signed audio */ 443 /* 16-bit signed audio */
444 desired-&#62;format=AUDIO_S16LSB; 444 desired-&#62;format=AUDIO_S16LSB;
445
446 /* Mono */
447 desired-&#62;channels=0;
445 448
446 /* Large audio buffer reduces risk of dropouts but increases response time */ 449 /* Large audio buffer reduces risk of dropouts but increases response time */
447 desired-&#62;samples=8192; 450 desired-&#62;samples=8192;
448 451
449 /* Our callback function */ 452 /* Our callback function */
469 SDL_PauseAudio(0);</PRE 472 SDL_PauseAudio(0);</PRE
470 ></DIV 473 ></DIV
471 ><DIV 474 ><DIV
472 CLASS="REFSECT1" 475 CLASS="REFSECT1"
473 ><A 476 ><A
474 NAME="AEN6203" 477 NAME="AEN6362"
475 ></A 478 ></A
476 ><H2 479 ><H2
477 >See Also</H2 480 >See Also</H2
478 ><P 481 ><P
479 ><A 482 ><A