seal 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (421) hide show
  1. data/.yardopts +1 -0
  2. data/LICENSE +13 -0
  3. data/README.md +265 -0
  4. data/ext/seal/extconf.rb +45 -0
  5. data/include/al/al.h +724 -0
  6. data/include/al/alc.h +277 -0
  7. data/include/al/efx-presets.h +402 -0
  8. data/include/al/efx.h +758 -0
  9. data/include/mpg123/mpg123.h +1034 -0
  10. data/include/ogg/config_types.h +25 -0
  11. data/include/ogg/ogg.h +210 -0
  12. data/include/ogg/os_types.h +147 -0
  13. data/include/seal.h +23 -0
  14. data/include/seal/buf.h +143 -0
  15. data/include/seal/core.h +95 -0
  16. data/include/seal/efs.h +112 -0
  17. data/include/seal/err.h +93 -0
  18. data/include/seal/fmt.h +58 -0
  19. data/include/seal/listener.h +103 -0
  20. data/include/seal/raw.h +86 -0
  21. data/include/seal/rvb.h +520 -0
  22. data/include/seal/src.h +413 -0
  23. data/include/seal/stream.h +81 -0
  24. data/include/vorbis/codec.h +243 -0
  25. data/include/vorbis/vorbisfile.h +206 -0
  26. data/mpg123/AUTHORS +150 -0
  27. data/mpg123/COPYING +773 -0
  28. data/mpg123/ChangeLog +3 -0
  29. data/mpg123/INSTALL +111 -0
  30. data/mpg123/Makefile.am +99 -0
  31. data/mpg123/Makefile.in +1043 -0
  32. data/mpg123/NEWS +1200 -0
  33. data/mpg123/NEWS.libmpg123 +133 -0
  34. data/mpg123/README +203 -0
  35. data/mpg123/TODO +38 -0
  36. data/mpg123/aclocal.m4 +1168 -0
  37. data/mpg123/build/config.guess +1530 -0
  38. data/mpg123/build/config.sub +1782 -0
  39. data/mpg123/build/depcomp +707 -0
  40. data/mpg123/build/install-sh +527 -0
  41. data/mpg123/build/ltmain.sh +9655 -0
  42. data/mpg123/build/missing +330 -0
  43. data/mpg123/configure +20267 -0
  44. data/mpg123/configure.ac +2178 -0
  45. data/mpg123/doc/ACCURACY +2 -0
  46. data/mpg123/doc/BENCHMARKING +110 -0
  47. data/mpg123/doc/BUGS +3 -0
  48. data/mpg123/doc/CONTACT +17 -0
  49. data/mpg123/doc/LICENSE +22 -0
  50. data/mpg123/doc/Makefile.am +32 -0
  51. data/mpg123/doc/Makefile.in +490 -0
  52. data/mpg123/doc/PATENTS +39 -0
  53. data/mpg123/doc/README.3DNOW +56 -0
  54. data/mpg123/doc/README.gain +171 -0
  55. data/mpg123/doc/README.remote +218 -0
  56. data/mpg123/doc/ROAD_TO_LGPL +270 -0
  57. data/mpg123/doc/THANKS +13 -0
  58. data/mpg123/doc/TODO +63 -0
  59. data/mpg123/doc/doxy_examples.c +21 -0
  60. data/mpg123/doc/doxygen.conf +41 -0
  61. data/mpg123/doc/doxyhead.xhtml +12 -0
  62. data/mpg123/doc/examples/dump_seekindex.c +41 -0
  63. data/mpg123/doc/examples/extract_frames.c +92 -0
  64. data/mpg123/doc/examples/feedseek.c +238 -0
  65. data/mpg123/doc/examples/id3dump.c +178 -0
  66. data/mpg123/doc/examples/mpg123_to_wav.c +118 -0
  67. data/mpg123/doc/examples/mpglib.c +92 -0
  68. data/mpg123/doc/examples/scan.c +47 -0
  69. data/mpg123/doc/libmpg123_speed.txt +84 -0
  70. data/mpg123/equalize.dat +37 -0
  71. data/mpg123/libmpg123.pc.in +11 -0
  72. data/mpg123/m4/addrconfig.m4 +34 -0
  73. data/mpg123/m4/libtool.m4 +7982 -0
  74. data/mpg123/m4/ltoptions.m4 +384 -0
  75. data/mpg123/m4/ltsugar.m4 +123 -0
  76. data/mpg123/m4/ltversion.m4 +23 -0
  77. data/mpg123/m4/lt~obsolete.m4 +98 -0
  78. data/mpg123/makedll.sh +19 -0
  79. data/mpg123/man1/mpg123.1 +512 -0
  80. data/mpg123/mpg123.spec +68 -0
  81. data/mpg123/mpg123.spec.in +68 -0
  82. data/mpg123/ports/MSVC++/2005/libmpg123/libmpg123.vcproj +741 -0
  83. data/mpg123/ports/MSVC++/2008/dump_seekindex/dump_seekindex.vcproj +194 -0
  84. data/mpg123/ports/MSVC++/2008/feedseek/feedseek.vcproj +195 -0
  85. data/mpg123/ports/MSVC++/2008/libmpg123/libmpg123.vcproj +1357 -0
  86. data/mpg123/ports/MSVC++/2008/mpg123.sln +44 -0
  87. data/mpg123/ports/MSVC++/2008/mpglib/mpglib.vcproj +191 -0
  88. data/mpg123/ports/MSVC++/2008/scan/scan.vcproj +195 -0
  89. data/mpg123/ports/MSVC++/2008clr/2008clr.sln +81 -0
  90. data/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/Program.cs +435 -0
  91. data/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/Properties/AssemblyInfo.cs +36 -0
  92. data/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/ReplaceReaderclr.csproj +72 -0
  93. data/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/Program.cs +331 -0
  94. data/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/Properties/AssemblyInfo.cs +36 -0
  95. data/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/feedseekclr.csproj +71 -0
  96. data/mpg123/ports/MSVC++/2008clr/examples/scanclr/Program.cs +79 -0
  97. data/mpg123/ports/MSVC++/2008clr/examples/scanclr/Properties/AssemblyInfo.cs +36 -0
  98. data/mpg123/ports/MSVC++/2008clr/examples/scanclr/scanclr.csproj +70 -0
  99. data/mpg123/ports/MSVC++/2008clr/mpg123clr/AssemblyInfo.cpp +76 -0
  100. data/mpg123/ports/MSVC++/2008clr/mpg123clr/ReadMe.txt +165 -0
  101. data/mpg123/ports/MSVC++/2008clr/mpg123clr/advanced.cpp +91 -0
  102. data/mpg123/ports/MSVC++/2008clr/mpg123clr/advanced.h +130 -0
  103. data/mpg123/ports/MSVC++/2008clr/mpg123clr/dllmain.cpp +19 -0
  104. data/mpg123/ports/MSVC++/2008clr/mpg123clr/enum.h +218 -0
  105. data/mpg123/ports/MSVC++/2008clr/mpg123clr/error.cpp +48 -0
  106. data/mpg123/ports/MSVC++/2008clr/mpg123clr/error.h +134 -0
  107. data/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v1.cpp +92 -0
  108. data/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v1.h +132 -0
  109. data/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v2.cpp +138 -0
  110. data/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v2.h +152 -0
  111. data/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.cpp +896 -0
  112. data/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.h +953 -0
  113. data/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.rc +102 -0
  114. data/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.vcproj +328 -0
  115. data/mpg123/ports/MSVC++/2008clr/mpg123clr/resource.h +14 -0
  116. data/mpg123/ports/MSVC++/2008clr/mpg123clr/stdafx.cpp +8 -0
  117. data/mpg123/ports/MSVC++/2008clr/mpg123clr/stdafx.h +38 -0
  118. data/mpg123/ports/MSVC++/2008clr/mpg123clr/string.cpp +166 -0
  119. data/mpg123/ports/MSVC++/2008clr/mpg123clr/string.h +265 -0
  120. data/mpg123/ports/MSVC++/2008clr/mpg123clr/targetver.h +24 -0
  121. data/mpg123/ports/MSVC++/2008clr/mpg123clr/text.cpp +67 -0
  122. data/mpg123/ports/MSVC++/2008clr/mpg123clr/text.h +111 -0
  123. data/mpg123/ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj +90 -0
  124. data/mpg123/ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj.filters +6 -0
  125. data/mpg123/ports/MSVC++/2010/feedseek/feedseek.vcxproj +95 -0
  126. data/mpg123/ports/MSVC++/2010/feedseek/feedseek.vcxproj.filters +6 -0
  127. data/mpg123/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj +960 -0
  128. data/mpg123/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj.user +3 -0
  129. data/mpg123/ports/MSVC++/2010/libmpg123/yasm.exe +0 -0
  130. data/mpg123/ports/MSVC++/2010/mpg123.sln +38 -0
  131. data/mpg123/ports/MSVC++/2010/scan/scan.vcxproj +93 -0
  132. data/mpg123/ports/MSVC++/2010/scan/scan.vcxproj.filters +6 -0
  133. data/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/CORE/CORE_FileIn.H +15 -0
  134. data/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/CORE/SourceFilter_MP3.H +139 -0
  135. data/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H +206 -0
  136. data/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/IIEP_FileIn.H +167 -0
  137. data/mpg123/ports/MSVC++/CMP3Stream/README +4 -0
  138. data/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_FileIn.CPP +462 -0
  139. data/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_Log.CPP +122 -0
  140. data/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_Mutex.CPP +35 -0
  141. data/mpg123/ports/MSVC++/CMP3Stream/SOURCE/SourceFilter_MP3Stream.CPP +586 -0
  142. data/mpg123/ports/MSVC++/CMP3Stream/libMPG123/PLACE_LIBMPG123_SOURCES_HERE +0 -0
  143. data/mpg123/ports/MSVC++/CMP3Stream/libMPG123/libMPG123.vcproj +245 -0
  144. data/mpg123/ports/MSVC++/config.h +35 -0
  145. data/mpg123/ports/MSVC++/examples/feedseek.c +240 -0
  146. data/mpg123/ports/MSVC++/examples/scan.c +47 -0
  147. data/mpg123/ports/MSVC++/mpg123.h +46 -0
  148. data/mpg123/ports/MSVC++/msvc.c +59 -0
  149. data/mpg123/ports/README +26 -0
  150. data/mpg123/ports/Sony_PSP/Makefile.psp +38 -0
  151. data/mpg123/ports/Sony_PSP/README +11 -0
  152. data/mpg123/ports/Sony_PSP/config.h +368 -0
  153. data/mpg123/ports/Sony_PSP/readers.c.patch +2 -0
  154. data/mpg123/ports/Xcode/config.h +197 -0
  155. data/mpg123/ports/Xcode/mpg123.h +17 -0
  156. data/mpg123/ports/Xcode/mpg123.xcodeproj/project.pbxproj +670 -0
  157. data/mpg123/ports/mpg123_.pas +478 -0
  158. data/mpg123/scripts/benchmark-cpu.pl +56 -0
  159. data/mpg123/scripts/tag_lyrics.py +76 -0
  160. data/mpg123/src/Makefile.am +186 -0
  161. data/mpg123/src/Makefile.in +1097 -0
  162. data/mpg123/src/audio.c +725 -0
  163. data/mpg123/src/audio.h +106 -0
  164. data/mpg123/src/buffer.c +312 -0
  165. data/mpg123/src/buffer.h +45 -0
  166. data/mpg123/src/common.c +240 -0
  167. data/mpg123/src/common.h +29 -0
  168. data/mpg123/src/config.h.in +436 -0
  169. data/mpg123/src/control_generic.c +809 -0
  170. data/mpg123/src/equalizer.c +48 -0
  171. data/mpg123/src/genre.c +271 -0
  172. data/mpg123/src/genre.h +15 -0
  173. data/mpg123/src/getlopt.c +148 -0
  174. data/mpg123/src/getlopt.h +77 -0
  175. data/mpg123/src/httpget.c +700 -0
  176. data/mpg123/src/httpget.h +66 -0
  177. data/mpg123/src/legacy_module.c +74 -0
  178. data/mpg123/src/libmpg123/Makefile.am +141 -0
  179. data/mpg123/src/libmpg123/Makefile.in +919 -0
  180. data/mpg123/src/libmpg123/compat.c +138 -0
  181. data/mpg123/src/libmpg123/compat.h +178 -0
  182. data/mpg123/src/libmpg123/dct36_3dnow.S +505 -0
  183. data/mpg123/src/libmpg123/dct36_3dnowext.S +512 -0
  184. data/mpg123/src/libmpg123/dct64.c +174 -0
  185. data/mpg123/src/libmpg123/dct64_3dnow.S +712 -0
  186. data/mpg123/src/libmpg123/dct64_3dnowext.S +714 -0
  187. data/mpg123/src/libmpg123/dct64_altivec.c +315 -0
  188. data/mpg123/src/libmpg123/dct64_i386.c +336 -0
  189. data/mpg123/src/libmpg123/dct64_i486.c +342 -0
  190. data/mpg123/src/libmpg123/dct64_mmx.S +811 -0
  191. data/mpg123/src/libmpg123/dct64_neon.S +297 -0
  192. data/mpg123/src/libmpg123/dct64_neon_float.S +270 -0
  193. data/mpg123/src/libmpg123/dct64_sse.S +454 -0
  194. data/mpg123/src/libmpg123/dct64_sse_float.S +401 -0
  195. data/mpg123/src/libmpg123/dct64_x86_64.S +464 -0
  196. data/mpg123/src/libmpg123/dct64_x86_64_float.S +426 -0
  197. data/mpg123/src/libmpg123/debug.h +171 -0
  198. data/mpg123/src/libmpg123/decode.h +268 -0
  199. data/mpg123/src/libmpg123/dither.c +119 -0
  200. data/mpg123/src/libmpg123/dither.h +23 -0
  201. data/mpg123/src/libmpg123/equalizer.c +17 -0
  202. data/mpg123/src/libmpg123/equalizer_3dnow.S +70 -0
  203. data/mpg123/src/libmpg123/feature.c +106 -0
  204. data/mpg123/src/libmpg123/format.c +521 -0
  205. data/mpg123/src/libmpg123/frame.c +1046 -0
  206. data/mpg123/src/libmpg123/frame.h +410 -0
  207. data/mpg123/src/libmpg123/gapless.h +119 -0
  208. data/mpg123/src/libmpg123/getbits.h +100 -0
  209. data/mpg123/src/libmpg123/getcpuflags.S +91 -0
  210. data/mpg123/src/libmpg123/getcpuflags.h +47 -0
  211. data/mpg123/src/libmpg123/huffman.h +340 -0
  212. data/mpg123/src/libmpg123/icy.c +32 -0
  213. data/mpg123/src/libmpg123/icy.h +38 -0
  214. data/mpg123/src/libmpg123/icy2utf8.c +438 -0
  215. data/mpg123/src/libmpg123/icy2utf8.h +10 -0
  216. data/mpg123/src/libmpg123/id3.c +999 -0
  217. data/mpg123/src/libmpg123/id3.h +43 -0
  218. data/mpg123/src/libmpg123/index.c +134 -0
  219. data/mpg123/src/libmpg123/index.h +59 -0
  220. data/mpg123/src/libmpg123/intsym.h +256 -0
  221. data/mpg123/src/libmpg123/l12_integer_tables.h +278 -0
  222. data/mpg123/src/libmpg123/l2tables.h +164 -0
  223. data/mpg123/src/libmpg123/l3_integer_tables.h +1002 -0
  224. data/mpg123/src/libmpg123/layer1.c +155 -0
  225. data/mpg123/src/libmpg123/layer2.c +371 -0
  226. data/mpg123/src/libmpg123/layer3.c +2053 -0
  227. data/mpg123/src/libmpg123/lfs_alias.c +252 -0
  228. data/mpg123/src/libmpg123/lfs_wrap.c +751 -0
  229. data/mpg123/src/libmpg123/libmpg123.c +1607 -0
  230. data/mpg123/src/libmpg123/mangle.h +74 -0
  231. data/mpg123/src/libmpg123/mpeghead.h +87 -0
  232. data/mpg123/src/libmpg123/mpg123.h.in +1075 -0
  233. data/mpg123/src/libmpg123/mpg123lib_intern.h +338 -0
  234. data/mpg123/src/libmpg123/ntom.c +148 -0
  235. data/mpg123/src/libmpg123/optimize.c +964 -0
  236. data/mpg123/src/libmpg123/optimize.h +219 -0
  237. data/mpg123/src/libmpg123/parse.c +1179 -0
  238. data/mpg123/src/libmpg123/parse.h +25 -0
  239. data/mpg123/src/libmpg123/reader.h +137 -0
  240. data/mpg123/src/libmpg123/readers.c +1235 -0
  241. data/mpg123/src/libmpg123/sample.h +152 -0
  242. data/mpg123/src/libmpg123/stringbuf.c +163 -0
  243. data/mpg123/src/libmpg123/synth.c +816 -0
  244. data/mpg123/src/libmpg123/synth.h +196 -0
  245. data/mpg123/src/libmpg123/synth_3dnow.S +318 -0
  246. data/mpg123/src/libmpg123/synth_3dnowext.S +6 -0
  247. data/mpg123/src/libmpg123/synth_8bit.c +142 -0
  248. data/mpg123/src/libmpg123/synth_8bit.h +86 -0
  249. data/mpg123/src/libmpg123/synth_altivec.c +1057 -0
  250. data/mpg123/src/libmpg123/synth_arm.S +271 -0
  251. data/mpg123/src/libmpg123/synth_arm_accurate.S +287 -0
  252. data/mpg123/src/libmpg123/synth_i486.c +252 -0
  253. data/mpg123/src/libmpg123/synth_i586.S +336 -0
  254. data/mpg123/src/libmpg123/synth_i586_dither.S +375 -0
  255. data/mpg123/src/libmpg123/synth_mmx.S +125 -0
  256. data/mpg123/src/libmpg123/synth_mono.h +64 -0
  257. data/mpg123/src/libmpg123/synth_neon.S +123 -0
  258. data/mpg123/src/libmpg123/synth_neon_accurate.S +173 -0
  259. data/mpg123/src/libmpg123/synth_neon_float.S +149 -0
  260. data/mpg123/src/libmpg123/synth_neon_s32.S +168 -0
  261. data/mpg123/src/libmpg123/synth_ntom.h +213 -0
  262. data/mpg123/src/libmpg123/synth_real.c +404 -0
  263. data/mpg123/src/libmpg123/synth_s32.c +411 -0
  264. data/mpg123/src/libmpg123/synth_sse.S +6 -0
  265. data/mpg123/src/libmpg123/synth_sse3d.h +246 -0
  266. data/mpg123/src/libmpg123/synth_sse_accurate.S +294 -0
  267. data/mpg123/src/libmpg123/synth_sse_float.S +241 -0
  268. data/mpg123/src/libmpg123/synth_sse_s32.S +306 -0
  269. data/mpg123/src/libmpg123/synth_stereo_neon.S +175 -0
  270. data/mpg123/src/libmpg123/synth_stereo_neon_accurate.S +262 -0
  271. data/mpg123/src/libmpg123/synth_stereo_neon_float.S +220 -0
  272. data/mpg123/src/libmpg123/synth_stereo_neon_s32.S +247 -0
  273. data/mpg123/src/libmpg123/synth_stereo_sse_accurate.S +508 -0
  274. data/mpg123/src/libmpg123/synth_stereo_sse_float.S +416 -0
  275. data/mpg123/src/libmpg123/synth_stereo_sse_s32.S +540 -0
  276. data/mpg123/src/libmpg123/synth_stereo_x86_64.S +335 -0
  277. data/mpg123/src/libmpg123/synth_stereo_x86_64_accurate.S +454 -0
  278. data/mpg123/src/libmpg123/synth_stereo_x86_64_float.S +396 -0
  279. data/mpg123/src/libmpg123/synth_stereo_x86_64_s32.S +473 -0
  280. data/mpg123/src/libmpg123/synth_x86_64.S +244 -0
  281. data/mpg123/src/libmpg123/synth_x86_64_accurate.S +301 -0
  282. data/mpg123/src/libmpg123/synth_x86_64_float.S +259 -0
  283. data/mpg123/src/libmpg123/synth_x86_64_s32.S +312 -0
  284. data/mpg123/src/libmpg123/synths.h +52 -0
  285. data/mpg123/src/libmpg123/tabinit.c +294 -0
  286. data/mpg123/src/libmpg123/tabinit_mmx.S +210 -0
  287. data/mpg123/src/libmpg123/testcpu.c +35 -0
  288. data/mpg123/src/libmpg123/true.h +14 -0
  289. data/mpg123/src/local.c +63 -0
  290. data/mpg123/src/local.h +21 -0
  291. data/mpg123/src/metaprint.c +373 -0
  292. data/mpg123/src/metaprint.h +17 -0
  293. data/mpg123/src/module.c +306 -0
  294. data/mpg123/src/module.h +48 -0
  295. data/mpg123/src/mpg123.c +1405 -0
  296. data/mpg123/src/mpg123app.h +171 -0
  297. data/mpg123/src/output/Makefile.am +213 -0
  298. data/mpg123/src/output/Makefile.in +1238 -0
  299. data/mpg123/src/output/aix.c +300 -0
  300. data/mpg123/src/output/alib.c +209 -0
  301. data/mpg123/src/output/alsa.c +297 -0
  302. data/mpg123/src/output/arts.c +117 -0
  303. data/mpg123/src/output/coreaudio.c +370 -0
  304. data/mpg123/src/output/dummy.c +78 -0
  305. data/mpg123/src/output/esd.c +167 -0
  306. data/mpg123/src/output/hp.c +184 -0
  307. data/mpg123/src/output/jack.c +450 -0
  308. data/mpg123/src/output/mint.c +197 -0
  309. data/mpg123/src/output/nas.c +335 -0
  310. data/mpg123/src/output/openal.c +197 -0
  311. data/mpg123/src/output/os2.c +665 -0
  312. data/mpg123/src/output/oss.c +319 -0
  313. data/mpg123/src/output/portaudio.c +255 -0
  314. data/mpg123/src/output/pulse.c +164 -0
  315. data/mpg123/src/output/sdl.c +206 -0
  316. data/mpg123/src/output/sgi.c +213 -0
  317. data/mpg123/src/output/sndio.c +161 -0
  318. data/mpg123/src/output/sun.c +281 -0
  319. data/mpg123/src/output/win32.c +229 -0
  320. data/mpg123/src/playlist.c +596 -0
  321. data/mpg123/src/playlist.h +52 -0
  322. data/mpg123/src/resolver.c +319 -0
  323. data/mpg123/src/resolver.h +25 -0
  324. data/mpg123/src/sfifo.c +146 -0
  325. data/mpg123/src/sfifo.h +95 -0
  326. data/mpg123/src/streamdump.c +74 -0
  327. data/mpg123/src/streamdump.h +20 -0
  328. data/mpg123/src/term.c +479 -0
  329. data/mpg123/src/term.h +81 -0
  330. data/mpg123/src/tests/noise.c +52 -0
  331. data/mpg123/src/tests/plain_id3.c +109 -0
  332. data/mpg123/src/tests/seek_accuracy.c +261 -0
  333. data/mpg123/src/tests/seek_whence.c +56 -0
  334. data/mpg123/src/tests/testtext.h +34 -0
  335. data/mpg123/src/tests/text.c +80 -0
  336. data/mpg123/src/wav.c +464 -0
  337. data/mpg123/src/wavhead.h +68 -0
  338. data/mpg123/src/win32_net.c +599 -0
  339. data/mpg123/src/win32_support.c +191 -0
  340. data/mpg123/src/win32_support.h +152 -0
  341. data/mpg123/src/xfermem.c +321 -0
  342. data/mpg123/src/xfermem.h +74 -0
  343. data/mpg123/windows-builds.sh +137 -0
  344. data/msvc/lib/OpenAL32.lib +0 -0
  345. data/spec/fixtures/heal.ogg +0 -0
  346. data/spec/fixtures/tone_up.wav +0 -0
  347. data/spec/seal/buffer_spec.rb +37 -0
  348. data/spec/seal/core_spec.rb +29 -0
  349. data/spec/seal/effect_slot_spec.rb +38 -0
  350. data/spec/seal/listener_spec.rb +33 -0
  351. data/spec/seal/reverb_spec.rb +51 -0
  352. data/spec/seal/source_spec.rb +370 -0
  353. data/spec/seal/stream_spec.rb +38 -0
  354. data/spec/spec_helper.rb +45 -0
  355. data/spec/support/attribute_examples.rb +75 -0
  356. data/spec/support/audio_object_with_format.rb +27 -0
  357. data/spec/support/movable_object.rb +22 -0
  358. data/src/libogg/bitwise.c +857 -0
  359. data/src/libogg/framing.c +2093 -0
  360. data/src/libvorbis/backends.h +144 -0
  361. data/src/libvorbis/bitrate.c +253 -0
  362. data/src/libvorbis/bitrate.h +59 -0
  363. data/src/libvorbis/block.c +1046 -0
  364. data/src/libvorbis/codebook.c +484 -0
  365. data/src/libvorbis/codebook.h +119 -0
  366. data/src/libvorbis/codec_internal.h +167 -0
  367. data/src/libvorbis/envelope.c +375 -0
  368. data/src/libvorbis/envelope.h +80 -0
  369. data/src/libvorbis/floor0.c +221 -0
  370. data/src/libvorbis/floor1.c +1100 -0
  371. data/src/libvorbis/highlevel.h +58 -0
  372. data/src/libvorbis/info.c +668 -0
  373. data/src/libvorbis/lookup.c +94 -0
  374. data/src/libvorbis/lookup.h +32 -0
  375. data/src/libvorbis/lookup_data.h +192 -0
  376. data/src/libvorbis/lpc.c +160 -0
  377. data/src/libvorbis/lpc.h +29 -0
  378. data/src/libvorbis/lsp.c +456 -0
  379. data/src/libvorbis/lsp.h +28 -0
  380. data/src/libvorbis/mapping0.c +816 -0
  381. data/src/libvorbis/masking.h +785 -0
  382. data/src/libvorbis/mdct.c +563 -0
  383. data/src/libvorbis/mdct.h +71 -0
  384. data/src/libvorbis/misc.h +57 -0
  385. data/src/libvorbis/os.h +186 -0
  386. data/src/libvorbis/psy.c +1206 -0
  387. data/src/libvorbis/psy.h +154 -0
  388. data/src/libvorbis/registry.c +45 -0
  389. data/src/libvorbis/registry.h +32 -0
  390. data/src/libvorbis/res0.c +889 -0
  391. data/src/libvorbis/scales.h +90 -0
  392. data/src/libvorbis/sharedbook.c +579 -0
  393. data/src/libvorbis/smallft.c +1255 -0
  394. data/src/libvorbis/smallft.h +34 -0
  395. data/src/libvorbis/synthesis.c +184 -0
  396. data/src/libvorbis/vorbisfile.c +2337 -0
  397. data/src/libvorbis/window.c +2135 -0
  398. data/src/libvorbis/window.h +26 -0
  399. data/src/rubyext.c +2329 -0
  400. data/src/seal/buf.c +124 -0
  401. data/src/seal/core.c +283 -0
  402. data/src/seal/efs.c +74 -0
  403. data/src/seal/err.c +118 -0
  404. data/src/seal/fmt.c +86 -0
  405. data/src/seal/listener.c +111 -0
  406. data/src/seal/mpg.c +174 -0
  407. data/src/seal/mpg.h +24 -0
  408. data/src/seal/ov.c +180 -0
  409. data/src/seal/ov.h +22 -0
  410. data/src/seal/raw.c +59 -0
  411. data/src/seal/reader.c +102 -0
  412. data/src/seal/reader.h +59 -0
  413. data/src/seal/rvb.c +368 -0
  414. data/src/seal/src.c +654 -0
  415. data/src/seal/stream.c +109 -0
  416. data/src/seal/threading.c +66 -0
  417. data/src/seal/threading.h +20 -0
  418. data/src/seal/wav.c +297 -0
  419. data/src/seal/wav.h +23 -0
  420. data/src/win32api.rb +29 -0
  421. metadata +563 -0
@@ -0,0 +1,130 @@
1
+ /*
2
+ mpg123clr: MPEG Audio Decoder library Common Language Runtime version.
3
+
4
+ copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1
5
+ mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply.
6
+
7
+ All rights to this work freely assigned to the mpg123 project.
8
+ */
9
+ /*
10
+ libmpg123: MPEG Audio Decoder library
11
+
12
+ copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1
13
+ see COPYING and AUTHORS files in distribution or http://mpg123.org
14
+
15
+ */
16
+ /*
17
+ 1.8.1.0 04-Aug-09 Initial release.
18
+ 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb)
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #pragma warning(disable : 4635)
24
+ #include "mpg123.h"
25
+ #pragma warning(default : 4635)
26
+
27
+ #include "enum.h"
28
+ #include "error.h"
29
+
30
+ using namespace System;
31
+ using namespace System::Runtime::InteropServices;
32
+
33
+ namespace mpg123clr
34
+ {
35
+ // Recommended usage when creating reference type on the managed heap (not using stack semantics
36
+ // for reference types...) [see (Microsoft) Destructors and Finalizers in Visual C++]
37
+ //
38
+ // C++/CLI
39
+ // A myA;
40
+ // // use myA here
41
+ //
42
+ // Equivalent user code:
43
+ //
44
+ // A ^ myA = gcnew A;
45
+ // try { /* use myA here */ } finally { delete myA; }
46
+ //
47
+ //
48
+ // C# (from wikipedia)
49
+ // using(A myA = new A()) { /* Use myA here */ }
50
+ // Compiler calls myA.Dispose(), in a "finally" of a "try/finally" block
51
+ //
52
+ // Equivalent user code:
53
+ //
54
+ // A myA = new myA();
55
+ // try { /* Use myA here */ } finally { myA.Dispose(); }
56
+ //
57
+ // Otherwise Finalizer will be nondeterministically called by GC
58
+
59
+
60
+ ///<summary> CLR wrapper for mpg123_pars object.</summary>
61
+ public ref class advpars
62
+ {
63
+ protected public:
64
+ mpg123_pars* mp;
65
+
66
+ protected:
67
+ !advpars(void);
68
+
69
+ public:
70
+ ///<summary>Constructor.</summary>
71
+ ///<param name="error">Returns MPG123_OK or mpg123 error code.</param>
72
+ advpars([Out] int% error);
73
+
74
+ ///<summary>Destructor.</summary>
75
+ ~advpars(void);
76
+
77
+ ///<summary>Configure mpg123 parameters to accept no output formats.
78
+ ///<para>Use to clear default parameters prior to applying specific settings.</para>
79
+ ///<para>Returns MPG123 error codes.</para>
80
+ ///</summary>
81
+ ///<returns>MPG123 error codes.</returns>
82
+ mpg123clr::mpg::ErrorCode __clrcall mpg123_fmt_none(void);
83
+
84
+ ///<summary>Configure mpg123 parameters to accept all formats including custom rate you may set - this is the default.
85
+ ///<para>Returns MPG123 error codes.</para>
86
+ ///</summary>
87
+ ///<returns>MPG123 error codes.</returns>
88
+ mpg123clr::mpg::ErrorCode __clrcall mpg123_fmt_all(void);
89
+
90
+ ///<summary>Configure detailed output formats.
91
+ ///<para>Returns MPG123 error codes.</para>
92
+ ///</summary>
93
+ ///<param name="rate">Sample rate (Hertz)</param>
94
+ ///<param name="channels">Combination of channelcount.stereo and channelcount.mono</param>
95
+ ///<param name="encodings">Combination of accepted encodings for rate and channels e.g. enc.enc_signed16 | enc.enc_ulaw_8 (or 0 for none)</param>
96
+ ///<returns>MPG123 error codes.</returns>
97
+ /// VERSION CHECK: long as int for Intellisense
98
+ mpg123clr::mpg::ErrorCode __clrcall mpg123_fmt(int rate, mpg123clr::mpg::channelcount channels, int encodings);
99
+
100
+ ///<summary>Get available support for supplied rate and encoding.
101
+ ///<para>Returns 0 for no support (includes invalid parameters), or combination of channelcount.stereo and channelcount.mono.</para>
102
+ ///</summary>
103
+ ///<param name="rate">Sample rate (Hertz)</param>
104
+ ///<param name="encoding">Combination of accepted encodings for rate and channels e.g. enc.enc_signed16 | enc.enc_ulaw_8 (or 0 for none)</param>
105
+ ///<returns>Returns 0 for no support (includes invalid parameters), or combination of channelcount.stereo and channelcount.mono.</returns>
106
+ /// VERSION CHECK: long as int for Intellisense
107
+ mpg123clr::mpg::channelcount __clrcall mpg123_fmt_support(int rate, int encoding);
108
+
109
+ ///<summary>Set a specific advpars value.
110
+ ///<para>Returns MPG123 error codes.</para>
111
+ ///</summary>
112
+ ///<param name="type">Specifies the advpars parameter to be set.</param>
113
+ ///<param name="val">The integer value to be applied.</param>
114
+ ///<param name="fval">The real value to be applied.</param>
115
+ ///<returns>MPG123 error codes.</returns>
116
+ /// VERSION CHECK: long as int for Intellisense
117
+ mpg123clr::mpg::ErrorCode __clrcall mpg123_par(mpg123clr::mpg::parms type, int val, double fval);
118
+
119
+ ///<summary>Get a specific advpars value.
120
+ ///<para>Returns MPG123 error codes.</para>
121
+ ///</summary>
122
+ ///<param name="type">Specifies the advpars parameter to be returned.</param>
123
+ ///<param name="val">Returns the applicable integer value.</param>
124
+ ///<param name="fval">Returns the applicable real value.</param>
125
+ ///<returns>MPG123 error codes.</returns>
126
+ /// VERSION CHECK: long as int for Intellisense
127
+ mpg123clr::mpg::ErrorCode __clrcall mpg123_getpar(mpg123clr::mpg::parms type, [Out] int% val, [Out] double% fval);
128
+ };
129
+
130
+ }
@@ -0,0 +1,19 @@
1
+ // dllmain.cpp : Defines the entry point for the DLL application.
2
+ #include "stdafx.h"
3
+
4
+ BOOL APIENTRY DllMain( HMODULE hModule,
5
+ DWORD ul_reason_for_call,
6
+ LPVOID lpReserved
7
+ )
8
+ {
9
+ switch (ul_reason_for_call)
10
+ {
11
+ case DLL_PROCESS_ATTACH:
12
+ case DLL_THREAD_ATTACH:
13
+ case DLL_THREAD_DETACH:
14
+ case DLL_PROCESS_DETACH:
15
+ break;
16
+ }
17
+ return TRUE;
18
+ }
19
+
@@ -0,0 +1,218 @@
1
+ /*
2
+ mpg123clr: MPEG Audio Decoder library Common Language Runtime version.
3
+
4
+ copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1
5
+ mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply.
6
+
7
+ All rights to this work freely assigned to the mpg123 project.
8
+ */
9
+ /*
10
+ libmpg123: MPEG Audio Decoder library
11
+
12
+ copyright 1995-2011 by the mpg123 project - free software under the terms of the LGPL 2.1
13
+ see COPYING and AUTHORS files in distribution or http://mpg123.org
14
+
15
+ */
16
+ /*
17
+ 1.8.1.0 04-Aug-09 Initial release.
18
+ 1.10.0.0 30-Nov-09 release match - added mpg123_feature (mb)
19
+ 1.13.0.0 13-Jan-11 release match (mb)
20
+ */
21
+
22
+ #pragma once
23
+
24
+ #pragma warning(disable : 4635)
25
+ #include "mpg123.h"
26
+ #pragma warning(default : 4635)
27
+
28
+
29
+ namespace mpg123clr
30
+ {
31
+ ///<summary>Mpg123 enumerations.</summary>
32
+ namespace mpg
33
+ {
34
+
35
+ ///<summary>Enumeration of the parameters types that it is possible to set/get.</summary>
36
+ public enum class parms
37
+ {
38
+ verbose = MPG123_VERBOSE, /// set verbosity value for enabling messages to stderr, >= 0 makes sense (integer)
39
+ flags = MPG123_FLAGS, /// set all flags, p.ex val = MPG123_GAPLESS|MPG123_MONO_MIX (integer)
40
+ add_flags = MPG123_ADD_FLAGS, /// add some flags (integer)
41
+ force_rate = MPG123_FORCE_RATE, /// when value > 0, force output rate to that value (integer)
42
+ down_sample = MPG123_DOWN_SAMPLE, /// 0=native rate, 1=half rate, 2=quarter rate (integer)
43
+ rva = MPG123_RVA, /// one of the RVA choices above (integer)
44
+ downspeed = MPG123_DOWNSPEED, /// play a frame N times (integer)
45
+ upspeed = MPG123_UPSPEED, /// play every Nth frame (integer)
46
+ start_frame = MPG123_START_FRAME, /// start with this frame (skip frames before that, integer)
47
+ decode_frames = MPG123_DECODE_FRAMES, /// decode only this number of frames (integer)
48
+ icy_interval = MPG123_ICY_INTERVAL, /// stream contains ICY metadata with this interval (integer)
49
+ outscale = MPG123_OUTSCALE, /// the scale for output samples (amplitude - integer or float according to mpg123 output format, normally integer)
50
+ timeout = MPG123_TIMEOUT, /// timeout for reading from a stream (not supported on win32, integer)
51
+ remove_flags = MPG123_REMOVE_FLAGS, /// remove some flags (inverse of MPG123_ADD_FLAGS, integer)
52
+ resync_limit = MPG123_RESYNC_LIMIT, /// Try resync on frame parsing for that many bytes or until end of stream (<0 ... integer).
53
+ index_size = MPG123_INDEX_SIZE, /// Set the frame index size (if supported). Values <0 mean that the index is allowed to grow dynamically in these steps (in positive direction, of course) -- Use this when you really want a full index with every individual frame.
54
+ preframes = MPG123_PREFRAMES /// Decode/ignore that many frames in advance for layer 3. This is needed to fill bit reservoir after seeking, for example (but also at least one frame in advance is needed to have all "normal" data for layer 3). Give a positive integer value, please.
55
+
56
+ };
57
+
58
+
59
+ ///<summary>Parameter flag bits.</summary>
60
+ ///<remarks>Equivalent to MPG123_FLAGS, use the usual binary or ( | ) to combine.</remarks>
61
+ public enum class param_flags
62
+ {
63
+ force_mono = MPG123_FORCE_MONO, /// 0111 Force some mono mode: This is a test bitmask for seeing if any mono forcing is active.
64
+ mono_left = MPG123_MONO_LEFT, /// 0001 Force playback of left channel only.
65
+ mono_right = MPG123_MONO_RIGHT, /// 0010 Force playback of right channel only.
66
+ mono_mix = MPG123_MONO_MIX, /// 0100 Force playback of mixed mono.
67
+ force_stereo = MPG123_FORCE_STEREO, /// 1000 Force stereo output.
68
+ force_8bit = MPG123_FORCE_8BIT, /// 00010000 Force 8bit formats.
69
+ quiet = MPG123_QUIET, /// 00100000 Suppress any printouts (overrules verbose).
70
+ gapless = MPG123_GAPLESS, /// 01000000 Enable gapless decoding (default on if libmpg123 has support).
71
+ no_resync = MPG123_NO_RESYNC, /// 10000000 Disable resync stream after error.
72
+ seekbuffer = MPG123_SEEKBUFFER, /// 000100000000 Enable small buffer on non-seekable streams to allow some peek-ahead (for better MPEG sync).
73
+ fuzzy = MPG123_FUZZY, /// 001000000000 Enable fuzzy seeks (guessing byte offsets or using approximate seek points from Xing TOC)
74
+ force_float = MPG123_FORCE_FLOAT, /// 010000000000 Force floating point output (32 or 64 bits depends on mpg123 internal precision).
75
+
76
+ ///<summary>Prevent ID3 text translation to UTF-8.
77
+ ///<para>NOTE: Do not set if you intend to use CLR id3v2 objects.</para>
78
+ ///</summary>
79
+ plain_id3text = MPG123_PLAIN_ID3TEXT, /// 100000000000 Do not translate ID3 text data to UTF-8. ID3 strings will contain the raw text data, with the first byte containing the ID3 encoding code.
80
+
81
+ ignore_streamlength = MPG123_IGNORE_STREAMLENGTH, /// 1000000000000 Ignore any stream length information contained in the stream, which can be contained in a 'TLEN' frame of an ID3v2 tag or a Xing tag.
82
+
83
+ // 1.13.0.0
84
+ skip_id3v2 = MPG123_SKIP_ID3V2, /// 10 0000 0000 0000 Do not parse ID3v2 tags, just skip them.
85
+ };
86
+
87
+ ///<summary>RVA enumeration.</summary>
88
+ ///<remarks>Equivalent to MPG123_RVA.</remarks>
89
+ public enum class rva
90
+ {
91
+ rva_off = MPG123_RVA_OFF, /// RVA disabled (default).
92
+ rva_mix = MPG123_RVA_MIX, /// Use mix/track/radio gain.
93
+ rva_album = MPG123_RVA_ALBUM, /// Use album/audiophile gain
94
+ rva_max = MPG123_RVA_ALBUM, /// The maximum RVA code, may increase in future.
95
+ };
96
+
97
+ ///<summary>Feature set available for query with mpg123_feature. </summary>
98
+ ///<remarks>Equivalent to MPG123_FEATURE_SET.</remarks>
99
+ public enum class feature_set
100
+ {
101
+ feature_abi_utf8open = MPG123_FEATURE_ABI_UTF8OPEN, /// mpg123 expects path names to be given in UTF-8 encoding instead of plain native.
102
+ feature_output_8bit = MPG123_FEATURE_OUTPUT_8BIT, /// 8bit output
103
+ feature_output_16bit = MPG123_FEATURE_OUTPUT_16BIT, /// 16bit output
104
+ feature_output_32bit = MPG123_FEATURE_OUTPUT_32BIT, /// 32bit output
105
+ feature_index = MPG123_FEATURE_INDEX, /// support for building a frame index for accurate seeking
106
+ feature_parse_id3v2 = MPG123_FEATURE_PARSE_ID3V2, /// id3v2 parsing
107
+ feature_decode_layer1 = MPG123_FEATURE_DECODE_LAYER1, /// mpeg layer-1 decoder enabled
108
+ feature_decode_layer2 = MPG123_FEATURE_DECODE_LAYER2, /// mpeg layer-2 decoder enabled
109
+ feature_decode_layer3 = MPG123_FEATURE_DECODE_LAYER3, /// mpeg layer-3 decoder enabled
110
+ feature_decode_accurate = MPG123_FEATURE_DECODE_ACCURATE, /// accurate decoder rounding
111
+ feature_decode_downsample = MPG123_FEATURE_DECODE_DOWNSAMPLE, /// downsample (sample omit)
112
+ feature_decode_ntom = MPG123_FEATURE_DECODE_NTOM, /// flexible rate decoding
113
+ feature_parse_icy = MPG123_FEATURE_PARSE_ICY, /// ICY support
114
+ feature_timeout_read = MPG123_FEATURE_TIMEOUT_READ, /// Reader with timeout (network)
115
+ };
116
+
117
+
118
+
119
+ ///<summary>An enum over all sample types possibly known to mpg123.</summary>
120
+ ///<remarks><para>The values are designed as bit flags to allow bitmasking for encoding families.</para>
121
+ ///
122
+ ///<para>Note that (your build of) libmpg123 does not necessarily support all these.
123
+ /// Usually, you can expect the 8bit encodings and signed 16 bit.
124
+ /// Also 32bit float will be usual beginning with mpg123-1.7.0 .</para>
125
+ ///
126
+ ///<para>What you should bear in mind is that (SSE, etc) optimized routines may be absent
127
+ /// for some formats. We do have SSE for 16, 32 bit and float, though.
128
+ /// 24 bit integer is done via postprocessing of 32 bit output -- just cutting
129
+ /// the last byte, no rounding, even. If you want better, do it yourself.</para>
130
+ ///
131
+ ///<para>All formats are in native byte order. On a little endian machine this should mean
132
+ /// that you can just feed the MPG123_ENC_SIGNED_32 data to common 24bit hardware that
133
+ /// ignores the lowest byte (or you could choose to do rounding with these lower bits).</para>
134
+ ///</remarks>
135
+ public enum class enc
136
+ {
137
+ enc_8 = MPG123_ENC_8, /// 0000 0000 1111 Some 8 bit integer encoding.
138
+ enc_16 = MPG123_ENC_16, /// 0000 0100 0000 Some 16 bit integer encoding.
139
+ enc_24 = MPG123_ENC_24, /// 0100 0000 0000 0000 Some 24 bit integer encoding. (r1.13)
140
+ enc_32 = MPG123_ENC_32, /// 0001 0000 0000 Some 32 bit integer encoding.
141
+ enc_signed = MPG123_ENC_SIGNED, /// 0000 1000 0000 Some signed integer encoding.
142
+ enc_float = MPG123_ENC_FLOAT, /// 1110 0000 0000 Some float encoding.
143
+ enc_signed_16 = MPG123_ENC_SIGNED_16, /// 1101 0000 signed 16 bit
144
+ enc_unsigned_16 = MPG123_ENC_UNSIGNED_16, /// 0110 0000 unsigned 16 bit
145
+ enc_unsigned_8 = MPG123_ENC_UNSIGNED_8, /// 0000 0001 unsigned 8 bit
146
+ enc_signed_8 = MPG123_ENC_SIGNED_8, /// 1000 0010 signed 8 bit
147
+ enc_ulaw_8 = MPG123_ENC_ULAW_8, /// 0000 0100 ulaw 8 bit
148
+ enc_alaw_8 = MPG123_ENC_ALAW_8, /// 0000 1000 alaw 8 bit
149
+ enc_signed_32 = MPG123_ENC_SIGNED_32, /// 0001 0001 1000 0000 signed 32 bit
150
+ enc_unsigned_32 = MPG123_ENC_UNSIGNED_32, /// 0010 0001 0000 0000 unsigned 32 bit
151
+ enc_signed_24 = MPG123_ENC_SIGNED_24, /// 0101 0000 1000 0000 signed 24 bit (r1.13)
152
+ enc_unsigned_24 = MPG123_ENC_UNSIGNED_24, /// 0110 0000 0000 0000 unsigned 24 bit (r1.13)
153
+ enc_float_32 = MPG123_ENC_FLOAT_32, /// 0010 0000 0000 32bit float
154
+ enc_float_64 = MPG123_ENC_FLOAT_64, /// 0100 0000 0000 64bit float
155
+ enc_any = MPG123_ENC_ANY, /// any encoding
156
+ };
157
+
158
+
159
+ ///<summary>Channel count enumeration</summary>
160
+ ///<remarks>clr added <cref name="both">both</cref></remarks>
161
+ public enum class channelcount
162
+ {
163
+ mono = MPG123_MONO,
164
+ stereo = MPG123_STEREO,
165
+ both = MPG123_MONO | MPG123_STEREO,
166
+ };
167
+
168
+ ///<summary>Channel enumeration.</summary>
169
+ public enum class channels
170
+ {
171
+ left = MPG123_LEFT, /// The Left Channel.
172
+ right = MPG123_RIGHT, /// The Right Channel.
173
+ both = MPG123_LR, /// Both left and right channel; same as MPG123_LEFT|MPG123_RIGHT
174
+ };
175
+
176
+ ///<summary>VBR enumeration.</summary>
177
+ public enum class mpeg_vbr
178
+ {
179
+ cbr = MPG123_CBR, /// Constant Bitrate Mode (default)
180
+ vbr = MPG123_VBR, /// Variable Bitrate Mode
181
+ abr = MPG123_ABR, /// Average Bitrate Mode
182
+ };
183
+
184
+ ///<summary>MPEG Version enumeration.</summary>
185
+ public enum class mpeg_version
186
+ {
187
+ mpeg_1_0 = MPG123_1_0, /// MPEG Version 1.0
188
+ mpeg_2_0 = MPG123_2_0, /// MPEG Version 2.0
189
+ mpeg_2_5 = MPG123_2_5, /// MPEG Version 2.5
190
+ };
191
+
192
+ ///<summary>MPEG Mode enumeration.</summary>
193
+ public enum class mpeg_mode
194
+ {
195
+ m_stereo = MPG123_M_STEREO, /// Standard Stereo.
196
+ m_joint = MPG123_M_JOINT, /// Joint Stereo.
197
+ m_dual = MPG123_M_DUAL, /// Dual Channel.
198
+ m_mono = MPG123_M_MONO, /// Single Channel.
199
+ };
200
+
201
+ ///<summary>MPEG Flags enumeration.</summary>
202
+ public enum class mpeg_flags
203
+ {
204
+ CRC = MPG123_CRC, /// The bitstream is error protected using 16-bit CRC.
205
+ COPYRIGHT = MPG123_COPYRIGHT, /// The bitstream is copyrighted.
206
+ PRIVATE = MPG123_PRIVATE, /// The private bit has been set.
207
+ ORIGINAL = MPG123_ORIGINAL, /// The bitstream is an original, not a copy.
208
+ };
209
+
210
+ ///<summary>Positional state.</summary>
211
+ public enum class state
212
+ {
213
+ accurate = MPG123_ACCURATE /// Query if positons are currently accurate (integer value, 0 if false, 1 if true)
214
+ };
215
+
216
+
217
+ }
218
+ }
@@ -0,0 +1,48 @@
1
+ /*
2
+ mpg123clr: MPEG Audio Decoder library Common Language Runtime version.
3
+
4
+ copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1
5
+ mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply.
6
+
7
+ All rights to this work freely assigned to the mpg123 project.
8
+ */
9
+ /*
10
+ libmpg123: MPEG Audio Decoder library
11
+
12
+ copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1
13
+ see COPYING and AUTHORS files in distribution or http://mpg123.org
14
+
15
+ */
16
+ /*
17
+ 1.8.1.0 04-Aug-09 Initial release.
18
+ 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb)
19
+ */
20
+
21
+ #include "StdAfx.h"
22
+ #include "error.h"
23
+
24
+ mpg123clr::mpg123error::mpg123error(void)
25
+ {
26
+ }
27
+
28
+ // Destructor cleans up all resources
29
+ mpg123clr::mpg123error::~mpg123error(void)
30
+ {
31
+ // clean up code to release managed resources
32
+ // ...
33
+
34
+ // call Finalizer to clean up unmanaged resources
35
+ this->!mpg123error();
36
+ }
37
+
38
+ // Finalizer cleans up unmanaged resources
39
+ mpg123clr::mpg123error::!mpg123error(void)
40
+ {
41
+ // none!
42
+ }
43
+
44
+ String^ mpg123clr::mpg123error::mpg123_plain_strerror(mpg123clr::mpg::ErrorCode errcode)
45
+ {
46
+ return gcnew String(::mpg123_plain_strerror((int)errcode));
47
+ }
48
+
@@ -0,0 +1,134 @@
1
+ /*
2
+ mpg123clr: MPEG Audio Decoder library Common Language Runtime version.
3
+
4
+ copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1
5
+ mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply.
6
+
7
+ All rights to this work freely assigned to the mpg123 project.
8
+ */
9
+ /*
10
+ libmpg123: MPEG Audio Decoder library
11
+
12
+ copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1
13
+ see COPYING and AUTHORS files in distribution or http://mpg123.org
14
+
15
+ */
16
+ /*
17
+ 1.8.1.0 04-Aug-09 Initial release.
18
+ 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb)
19
+ 1.12.0.0 14-Apr-10 Revision harmonization (catch-up)
20
+ */
21
+
22
+ #pragma once
23
+
24
+ #pragma warning(disable : 4635)
25
+ #include "mpg123.h"
26
+ #pragma warning(default : 4635)
27
+
28
+ #include "enum.h"
29
+
30
+ using namespace System;
31
+
32
+ namespace mpg123clr
33
+ {
34
+ // defgroup mpg123_error mpg123 error handling
35
+ //
36
+ // Functions to get text version of the error numbers and an enumeration
37
+ // of the error codes returned by libmpg123.
38
+ //
39
+ // Most functions operating on a mpg123_handle simply return MPG123_OK on success and MPG123_ERR on failure (setting the internal error variable of the handle to the specific error code).
40
+ // Decoding/seek functions may also return message codes MPG123_DONE, MPG123_NEW_FORMAT and MPG123_NEED_MORE (please read up on these on how to react!).
41
+ // The positive range of return values is used for "useful" values when appropriate.
42
+ //
43
+ //
44
+ //
45
+
46
+
47
+ namespace mpg
48
+ {
49
+ ///<summary>Enumeration of the message and error codes as returned by libmpg123 functions.</summary>
50
+ public enum class ErrorCode
51
+ {
52
+ done = MPG123_DONE, /// Message: Track ended.
53
+ new_format = MPG123_NEW_FORMAT, /// Message: Output format will be different on next call.
54
+ need_more = MPG123_NEED_MORE, /// Message: For feed reader: "Feed me more!"
55
+ err = MPG123_ERR, /// Generic Error
56
+ ok = MPG123_OK, /// Success
57
+ bad_outformat = MPG123_BAD_OUTFORMAT, /// Unable to set up output format!
58
+ bad_channel = MPG123_BAD_CHANNEL, /// Invalid channel number specified.
59
+ bad_rate = MPG123_BAD_RATE, /// Invalid sample rate specified.
60
+ err_16to8table = MPG123_ERR_16TO8TABLE, /// Unable to allocate memory for 16 to 8 converter table!
61
+ bad_param = MPG123_BAD_PARAM, /// Bad parameter id!
62
+ bad_buffer = MPG123_BAD_BUFFER, /// Bad buffer given -- invalid pointer or too small size.
63
+ out_of_mem = MPG123_OUT_OF_MEM, /// Out of memory -- some malloc() failed.
64
+ not_initialized = MPG123_NOT_INITIALIZED, /// You didn't initialize the library!
65
+ bad_decoder = MPG123_BAD_DECODER, /// Invalid decoder choice.
66
+ bad_handle = MPG123_BAD_HANDLE, /// Invalid mpg123 handle.
67
+ no_buffers = MPG123_NO_BUFFERS, /// Unable to initialize frame buffers (out of memory?).
68
+ bad_rva = MPG123_BAD_RVA, /// Invalid RVA mode.
69
+ no_gapless = MPG123_NO_GAPLESS, /// This build doesn't support gapless decoding.
70
+ no_space = MPG123_NO_SPACE, /// Not enough buffer space.
71
+ bad_types = MPG123_BAD_TYPES, /// Incompatible numeric data types.
72
+ bad_band = MPG123_BAD_BAND, /// Bad equalizer band.
73
+ err_null = MPG123_ERR_NULL, /// Null pointer given where valid storage address needed.
74
+ err_reader = MPG123_ERR_READER, /// Error reading the stream.
75
+ no_seek_from_end = MPG123_NO_SEEK_FROM_END, /// Cannot seek from end (end is not known).
76
+ bad_whence = MPG123_BAD_WHENCE, /// Invalid 'whence' for seek function.
77
+ no_timeout = MPG123_NO_TIMEOUT, /// Build does not support stream timeouts.
78
+ bad_file = MPG123_BAD_FILE, /// File access error.
79
+ no_seek = MPG123_NO_SEEK, /// Seek not supported by stream.
80
+ no_reader = MPG123_NO_READER, /// No stream opened.
81
+ bad_pars = MPG123_BAD_PARS, /// Bad parameter handle.
82
+ bad_index_par = MPG123_BAD_INDEX_PAR, /// Bad parameters to mpg123_index()
83
+ out_of_sync = MPG123_OUT_OF_SYNC, /// Lost track in bytestream and did not try to resync.
84
+ resync_fail = MPG123_RESYNC_FAIL, /// Resync failed to find valid MPEG data.
85
+ no_8bit = MPG123_NO_8BIT, /// No 8bit encoding possible.
86
+ bad_align = MPG123_BAD_ALIGN, /// Stack aligmnent error
87
+ null_buffer = MPG123_NULL_BUFFER, /// NULL input buffer with non-zero size...
88
+ no_relseek = MPG123_NO_RELSEEK, /// Relative seek not possible (screwed up file offset)
89
+ null_pointer = MPG123_NULL_POINTER, /// You gave a null pointer somewhere where you shouldn't have.
90
+ bad_key = MPG123_BAD_KEY, /// Bad key value given.
91
+ no_index = MPG123_NO_INDEX, /// No frame index in this build.
92
+ index_fail = MPG123_INDEX_FAIL, /// Something with frame index went wrong.
93
+ bad_decoder_setup = MPG123_BAD_DECODER_SETUP, /// Something prevents a proper decoder setup
94
+ missing_feature = MPG123_MISSING_FEATURE, /// This feature has not been built into libmpg123.
95
+ /* 1.8.1 */
96
+ bad_value = MPG123_BAD_VALUE, /// A bad value has been given, somewhere.
97
+ lseek_failed = MPG123_LSEEK_FAILED, /// Low-level seek failed.
98
+ /* 1.12.0 */
99
+ bad_custom_io = MPG123_BAD_CUSTOM_IO, /// Custom I/O not prepared.
100
+ lfs_overflow = MPG123_LFS_OVERFLOW, /// Offset value overflow during translation of large file API calls,
101
+ /// - your client program cannot handle that large file.
102
+
103
+ };
104
+ }
105
+
106
+ ///<summary>Wrapper for mpg123_errors</summary>
107
+ public ref class mpg123error
108
+ {
109
+ protected:
110
+ ///<summary>Finalizer.
111
+ ///<para>Cleanly handles mpg123_delete of internal (unmanaged) handles.</para></summary>
112
+ /// Implementation of CLR Finalize().
113
+ !mpg123error(void);
114
+
115
+ public:
116
+ ///<summary>Constructor.</summary>
117
+ mpg123error(void);
118
+
119
+ ///<summary>Destructor. Used for final object deletion.
120
+ ///<para>Calls finalizer for clean disposal of internal (unmanaged) library handles.</para>
121
+ ///</summary>
122
+ /// Implementation of CLR Dispose().
123
+ /// ~Destructor and !Finalizer are the prescribed implementation of Dispose() and Finalize().
124
+ /// See Destructors and Finalizers in Visual C++
125
+ ~mpg123error(void);
126
+
127
+ ///<summary>Obtain a string description of the errcode meaning.
128
+ ///<para>Returns a String description representing the error code.</para>
129
+ ///</summary>
130
+ ///<param name="errcode">The error code to be described.</param>
131
+ ///<returns>Returns a String description representing the error code.</returns>
132
+ static String^ __clrcall mpg123_plain_strerror(mpg123clr::mpg::ErrorCode errcode);
133
+ };
134
+ }