home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue4 / SDL / gcc346 / !SDL / man / SDL_AudioCVT.3 < prev    next >
Encoding:
Text File  |  2006-09-20  |  2.8 KB  |  118 lines

  1. <!-- manual page source format generated by PolyglotMan v3.0.8+X.Org, -->
  2. <!-- available at http://polyglotman.sourceforge.net/ -->
  3.  
  4. <html>
  5. <head>
  6. <title>"SDL_AudioCVT"("3") manual page</title>
  7. </head>
  8. <body bgcolor='#efefef' text='black' link='blue' vlink='#551A8B' alink='red'>
  9. <a href='#toc'>Table of Contents</a><p>
  10.  
  11. <h2><a name='sect0' href='#toc0'>Name</a></h2>
  12. SDL_AudioCVT- Audio Conversion Structure 
  13. <h2><a name='sect1' href='#toc1'>Structure Definition</a></h2>
  14. <p>
  15. <br>
  16. <pre>CWtypedef struct{
  17.   int needed;
  18.   Uint16 src_format;
  19.   Uint16 dest_format;
  20.   double rate_incr;
  21.   Uint8 *buf;
  22.   int len;
  23.   int len_cvt;
  24.   int len_mult;
  25.   double len_ratio;
  26.   void (*filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
  27.   int filter_index;
  28. } SDL_AudioCVT;
  29. </pre><p>
  30.  
  31. <h2><a name='sect2' href='#toc2'>Structure Data</a></h2>
  32.  
  33. <dl>
  34.  
  35. <dt><b>needed</b> </dt>
  36. <dd>Set to one if the conversion is possible </dd>
  37.  
  38. <dt><b>src_format</b>
  39. </dt>
  40. <dd>Audio format of the source </dd>
  41.  
  42. <dt><b>dest_format</b> </dt>
  43. <dd>Audio format of the destination
  44. </dd>
  45.  
  46. <dt><b>rate_incr</b> </dt>
  47. <dd>Rate conversion increment </dd>
  48.  
  49. <dt><b>buf</b> </dt>
  50. <dd>Audio buffer </dd>
  51.  
  52. <dt><b>len</b> </dt>
  53. <dd>Length of the
  54. original audio buffer in bytes </dd>
  55.  
  56. <dt><b>len_cvt</b> </dt>
  57. <dd>Length of converted audio buffer
  58. in bytes (calculated) </dd>
  59.  
  60. <dt><b>len_mult</b> </dt>
  61. <dd><b>buf</b> must be <b>len</b>*<b>len_mult</b> bytes in size(calculated)
  62. </dd>
  63.  
  64. <dt><b>len_ratio</b> </dt>
  65. <dd>Final audio size is <b>len</b>*<b>len_ratio</b> </dd>
  66.  
  67. <dt><b>filters[10](..)</b> </dt>
  68. <dd>Pointers to functions
  69. needed for this conversion </dd>
  70.  
  71. <dt><b>filter_index</b> </dt>
  72. <dd>Current conversion function </dd>
  73. </dl>
  74.  
  75. <h2><a name='sect3' href='#toc3'>Description</a></h2>
  76. <p>
  77. The
  78. <b>SDL_AudioCVT</b> is used to convert audio data between different formats. A
  79. <b>SDL_AudioCVT</b> structure is created with the <i><b>SDL_BuildAudioCVT</b></i> function,
  80. while the actual conversion is done by the <i><b>SDL_ConvertAudio</b></i> function. <p>
  81. Many
  82. of the fields in the <b>SDL_AudioCVT</b> structure should be considered private
  83. and their function will not be discussed here. 
  84. <dl>
  85.  
  86. <dt><b>Uint8 *</b><b>buf</b></dt>
  87. <dd></dd>
  88.  
  89. <dt><b>int</b> <b>len</b></dt>
  90. <dd></dd>
  91.  
  92. <dt><b>int</b> <b>len_mult</b></dt>
  93. <dd></dd>
  94.  
  95. <dt><b>double</b>
  96. <b>len_ratio</b></dt>
  97. <dd></dd>
  98. </dl>
  99.  
  100. <h2><a name='sect4' href='#toc4'>See Also</a></h2>
  101. <p>
  102. <i><b>SDL_BuildAudioCVT</b></i>, <i><b>SDL_ConvertAudio</b></i>, <i><b>SDL_AudioSpec</b></i> 
  103. <!--
  104.   
  105.  <p>
  106.  
  107. <hr><p>
  108. <a name='toc'><b>Table of Contents</b></a><p>
  109. <ul>
  110. <li><a name='toc0' href='#sect0'>Name</a></li>
  111. <li><a name='toc1' href='#sect1'>Structure Definition</a></li>
  112. <li><a name='toc2' href='#sect2'>Structure Data</a></li>
  113. <li><a name='toc3' href='#sect3'>Description</a></li>
  114. <li><a name='toc4' href='#sect4'>See Also</a></li>
  115. </ul>
  116. </body>
  117. </html>
  118.