seal 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +1 -0
- data/LICENSE +13 -0
- data/README.md +265 -0
- data/ext/seal/extconf.rb +45 -0
- data/include/al/al.h +724 -0
- data/include/al/alc.h +277 -0
- data/include/al/efx-presets.h +402 -0
- data/include/al/efx.h +758 -0
- data/include/mpg123/mpg123.h +1034 -0
- data/include/ogg/config_types.h +25 -0
- data/include/ogg/ogg.h +210 -0
- data/include/ogg/os_types.h +147 -0
- data/include/seal.h +23 -0
- data/include/seal/buf.h +143 -0
- data/include/seal/core.h +95 -0
- data/include/seal/efs.h +112 -0
- data/include/seal/err.h +93 -0
- data/include/seal/fmt.h +58 -0
- data/include/seal/listener.h +103 -0
- data/include/seal/raw.h +86 -0
- data/include/seal/rvb.h +520 -0
- data/include/seal/src.h +413 -0
- data/include/seal/stream.h +81 -0
- data/include/vorbis/codec.h +243 -0
- data/include/vorbis/vorbisfile.h +206 -0
- data/mpg123/AUTHORS +150 -0
- data/mpg123/COPYING +773 -0
- data/mpg123/ChangeLog +3 -0
- data/mpg123/INSTALL +111 -0
- data/mpg123/Makefile.am +99 -0
- data/mpg123/Makefile.in +1043 -0
- data/mpg123/NEWS +1200 -0
- data/mpg123/NEWS.libmpg123 +133 -0
- data/mpg123/README +203 -0
- data/mpg123/TODO +38 -0
- data/mpg123/aclocal.m4 +1168 -0
- data/mpg123/build/config.guess +1530 -0
- data/mpg123/build/config.sub +1782 -0
- data/mpg123/build/depcomp +707 -0
- data/mpg123/build/install-sh +527 -0
- data/mpg123/build/ltmain.sh +9655 -0
- data/mpg123/build/missing +330 -0
- data/mpg123/configure +20267 -0
- data/mpg123/configure.ac +2178 -0
- data/mpg123/doc/ACCURACY +2 -0
- data/mpg123/doc/BENCHMARKING +110 -0
- data/mpg123/doc/BUGS +3 -0
- data/mpg123/doc/CONTACT +17 -0
- data/mpg123/doc/LICENSE +22 -0
- data/mpg123/doc/Makefile.am +32 -0
- data/mpg123/doc/Makefile.in +490 -0
- data/mpg123/doc/PATENTS +39 -0
- data/mpg123/doc/README.3DNOW +56 -0
- data/mpg123/doc/README.gain +171 -0
- data/mpg123/doc/README.remote +218 -0
- data/mpg123/doc/ROAD_TO_LGPL +270 -0
- data/mpg123/doc/THANKS +13 -0
- data/mpg123/doc/TODO +63 -0
- data/mpg123/doc/doxy_examples.c +21 -0
- data/mpg123/doc/doxygen.conf +41 -0
- data/mpg123/doc/doxyhead.xhtml +12 -0
- data/mpg123/doc/examples/dump_seekindex.c +41 -0
- data/mpg123/doc/examples/extract_frames.c +92 -0
- data/mpg123/doc/examples/feedseek.c +238 -0
- data/mpg123/doc/examples/id3dump.c +178 -0
- data/mpg123/doc/examples/mpg123_to_wav.c +118 -0
- data/mpg123/doc/examples/mpglib.c +92 -0
- data/mpg123/doc/examples/scan.c +47 -0
- data/mpg123/doc/libmpg123_speed.txt +84 -0
- data/mpg123/equalize.dat +37 -0
- data/mpg123/libmpg123.pc.in +11 -0
- data/mpg123/m4/addrconfig.m4 +34 -0
- data/mpg123/m4/libtool.m4 +7982 -0
- data/mpg123/m4/ltoptions.m4 +384 -0
- data/mpg123/m4/ltsugar.m4 +123 -0
- data/mpg123/m4/ltversion.m4 +23 -0
- data/mpg123/m4/lt~obsolete.m4 +98 -0
- data/mpg123/makedll.sh +19 -0
- data/mpg123/man1/mpg123.1 +512 -0
- data/mpg123/mpg123.spec +68 -0
- data/mpg123/mpg123.spec.in +68 -0
- data/mpg123/ports/MSVC++/2005/libmpg123/libmpg123.vcproj +741 -0
- data/mpg123/ports/MSVC++/2008/dump_seekindex/dump_seekindex.vcproj +194 -0
- data/mpg123/ports/MSVC++/2008/feedseek/feedseek.vcproj +195 -0
- data/mpg123/ports/MSVC++/2008/libmpg123/libmpg123.vcproj +1357 -0
- data/mpg123/ports/MSVC++/2008/mpg123.sln +44 -0
- data/mpg123/ports/MSVC++/2008/mpglib/mpglib.vcproj +191 -0
- data/mpg123/ports/MSVC++/2008/scan/scan.vcproj +195 -0
- data/mpg123/ports/MSVC++/2008clr/2008clr.sln +81 -0
- data/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/Program.cs +435 -0
- data/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/Properties/AssemblyInfo.cs +36 -0
- data/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/ReplaceReaderclr.csproj +72 -0
- data/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/Program.cs +331 -0
- data/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/Properties/AssemblyInfo.cs +36 -0
- data/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/feedseekclr.csproj +71 -0
- data/mpg123/ports/MSVC++/2008clr/examples/scanclr/Program.cs +79 -0
- data/mpg123/ports/MSVC++/2008clr/examples/scanclr/Properties/AssemblyInfo.cs +36 -0
- data/mpg123/ports/MSVC++/2008clr/examples/scanclr/scanclr.csproj +70 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/AssemblyInfo.cpp +76 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/ReadMe.txt +165 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/advanced.cpp +91 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/advanced.h +130 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/dllmain.cpp +19 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/enum.h +218 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/error.cpp +48 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/error.h +134 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v1.cpp +92 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v1.h +132 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v2.cpp +138 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v2.h +152 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.cpp +896 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.h +953 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.rc +102 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.vcproj +328 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/resource.h +14 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/stdafx.cpp +8 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/stdafx.h +38 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/string.cpp +166 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/string.h +265 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/targetver.h +24 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/text.cpp +67 -0
- data/mpg123/ports/MSVC++/2008clr/mpg123clr/text.h +111 -0
- data/mpg123/ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj +90 -0
- data/mpg123/ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj.filters +6 -0
- data/mpg123/ports/MSVC++/2010/feedseek/feedseek.vcxproj +95 -0
- data/mpg123/ports/MSVC++/2010/feedseek/feedseek.vcxproj.filters +6 -0
- data/mpg123/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj +960 -0
- data/mpg123/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj.user +3 -0
- data/mpg123/ports/MSVC++/2010/libmpg123/yasm.exe +0 -0
- data/mpg123/ports/MSVC++/2010/mpg123.sln +38 -0
- data/mpg123/ports/MSVC++/2010/scan/scan.vcxproj +93 -0
- data/mpg123/ports/MSVC++/2010/scan/scan.vcxproj.filters +6 -0
- data/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/CORE/CORE_FileIn.H +15 -0
- data/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/CORE/SourceFilter_MP3.H +139 -0
- data/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H +206 -0
- data/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/IIEP_FileIn.H +167 -0
- data/mpg123/ports/MSVC++/CMP3Stream/README +4 -0
- data/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_FileIn.CPP +462 -0
- data/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_Log.CPP +122 -0
- data/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_Mutex.CPP +35 -0
- data/mpg123/ports/MSVC++/CMP3Stream/SOURCE/SourceFilter_MP3Stream.CPP +586 -0
- data/mpg123/ports/MSVC++/CMP3Stream/libMPG123/PLACE_LIBMPG123_SOURCES_HERE +0 -0
- data/mpg123/ports/MSVC++/CMP3Stream/libMPG123/libMPG123.vcproj +245 -0
- data/mpg123/ports/MSVC++/config.h +35 -0
- data/mpg123/ports/MSVC++/examples/feedseek.c +240 -0
- data/mpg123/ports/MSVC++/examples/scan.c +47 -0
- data/mpg123/ports/MSVC++/mpg123.h +46 -0
- data/mpg123/ports/MSVC++/msvc.c +59 -0
- data/mpg123/ports/README +26 -0
- data/mpg123/ports/Sony_PSP/Makefile.psp +38 -0
- data/mpg123/ports/Sony_PSP/README +11 -0
- data/mpg123/ports/Sony_PSP/config.h +368 -0
- data/mpg123/ports/Sony_PSP/readers.c.patch +2 -0
- data/mpg123/ports/Xcode/config.h +197 -0
- data/mpg123/ports/Xcode/mpg123.h +17 -0
- data/mpg123/ports/Xcode/mpg123.xcodeproj/project.pbxproj +670 -0
- data/mpg123/ports/mpg123_.pas +478 -0
- data/mpg123/scripts/benchmark-cpu.pl +56 -0
- data/mpg123/scripts/tag_lyrics.py +76 -0
- data/mpg123/src/Makefile.am +186 -0
- data/mpg123/src/Makefile.in +1097 -0
- data/mpg123/src/audio.c +725 -0
- data/mpg123/src/audio.h +106 -0
- data/mpg123/src/buffer.c +312 -0
- data/mpg123/src/buffer.h +45 -0
- data/mpg123/src/common.c +240 -0
- data/mpg123/src/common.h +29 -0
- data/mpg123/src/config.h.in +436 -0
- data/mpg123/src/control_generic.c +809 -0
- data/mpg123/src/equalizer.c +48 -0
- data/mpg123/src/genre.c +271 -0
- data/mpg123/src/genre.h +15 -0
- data/mpg123/src/getlopt.c +148 -0
- data/mpg123/src/getlopt.h +77 -0
- data/mpg123/src/httpget.c +700 -0
- data/mpg123/src/httpget.h +66 -0
- data/mpg123/src/legacy_module.c +74 -0
- data/mpg123/src/libmpg123/Makefile.am +141 -0
- data/mpg123/src/libmpg123/Makefile.in +919 -0
- data/mpg123/src/libmpg123/compat.c +138 -0
- data/mpg123/src/libmpg123/compat.h +178 -0
- data/mpg123/src/libmpg123/dct36_3dnow.S +505 -0
- data/mpg123/src/libmpg123/dct36_3dnowext.S +512 -0
- data/mpg123/src/libmpg123/dct64.c +174 -0
- data/mpg123/src/libmpg123/dct64_3dnow.S +712 -0
- data/mpg123/src/libmpg123/dct64_3dnowext.S +714 -0
- data/mpg123/src/libmpg123/dct64_altivec.c +315 -0
- data/mpg123/src/libmpg123/dct64_i386.c +336 -0
- data/mpg123/src/libmpg123/dct64_i486.c +342 -0
- data/mpg123/src/libmpg123/dct64_mmx.S +811 -0
- data/mpg123/src/libmpg123/dct64_neon.S +297 -0
- data/mpg123/src/libmpg123/dct64_neon_float.S +270 -0
- data/mpg123/src/libmpg123/dct64_sse.S +454 -0
- data/mpg123/src/libmpg123/dct64_sse_float.S +401 -0
- data/mpg123/src/libmpg123/dct64_x86_64.S +464 -0
- data/mpg123/src/libmpg123/dct64_x86_64_float.S +426 -0
- data/mpg123/src/libmpg123/debug.h +171 -0
- data/mpg123/src/libmpg123/decode.h +268 -0
- data/mpg123/src/libmpg123/dither.c +119 -0
- data/mpg123/src/libmpg123/dither.h +23 -0
- data/mpg123/src/libmpg123/equalizer.c +17 -0
- data/mpg123/src/libmpg123/equalizer_3dnow.S +70 -0
- data/mpg123/src/libmpg123/feature.c +106 -0
- data/mpg123/src/libmpg123/format.c +521 -0
- data/mpg123/src/libmpg123/frame.c +1046 -0
- data/mpg123/src/libmpg123/frame.h +410 -0
- data/mpg123/src/libmpg123/gapless.h +119 -0
- data/mpg123/src/libmpg123/getbits.h +100 -0
- data/mpg123/src/libmpg123/getcpuflags.S +91 -0
- data/mpg123/src/libmpg123/getcpuflags.h +47 -0
- data/mpg123/src/libmpg123/huffman.h +340 -0
- data/mpg123/src/libmpg123/icy.c +32 -0
- data/mpg123/src/libmpg123/icy.h +38 -0
- data/mpg123/src/libmpg123/icy2utf8.c +438 -0
- data/mpg123/src/libmpg123/icy2utf8.h +10 -0
- data/mpg123/src/libmpg123/id3.c +999 -0
- data/mpg123/src/libmpg123/id3.h +43 -0
- data/mpg123/src/libmpg123/index.c +134 -0
- data/mpg123/src/libmpg123/index.h +59 -0
- data/mpg123/src/libmpg123/intsym.h +256 -0
- data/mpg123/src/libmpg123/l12_integer_tables.h +278 -0
- data/mpg123/src/libmpg123/l2tables.h +164 -0
- data/mpg123/src/libmpg123/l3_integer_tables.h +1002 -0
- data/mpg123/src/libmpg123/layer1.c +155 -0
- data/mpg123/src/libmpg123/layer2.c +371 -0
- data/mpg123/src/libmpg123/layer3.c +2053 -0
- data/mpg123/src/libmpg123/lfs_alias.c +252 -0
- data/mpg123/src/libmpg123/lfs_wrap.c +751 -0
- data/mpg123/src/libmpg123/libmpg123.c +1607 -0
- data/mpg123/src/libmpg123/mangle.h +74 -0
- data/mpg123/src/libmpg123/mpeghead.h +87 -0
- data/mpg123/src/libmpg123/mpg123.h.in +1075 -0
- data/mpg123/src/libmpg123/mpg123lib_intern.h +338 -0
- data/mpg123/src/libmpg123/ntom.c +148 -0
- data/mpg123/src/libmpg123/optimize.c +964 -0
- data/mpg123/src/libmpg123/optimize.h +219 -0
- data/mpg123/src/libmpg123/parse.c +1179 -0
- data/mpg123/src/libmpg123/parse.h +25 -0
- data/mpg123/src/libmpg123/reader.h +137 -0
- data/mpg123/src/libmpg123/readers.c +1235 -0
- data/mpg123/src/libmpg123/sample.h +152 -0
- data/mpg123/src/libmpg123/stringbuf.c +163 -0
- data/mpg123/src/libmpg123/synth.c +816 -0
- data/mpg123/src/libmpg123/synth.h +196 -0
- data/mpg123/src/libmpg123/synth_3dnow.S +318 -0
- data/mpg123/src/libmpg123/synth_3dnowext.S +6 -0
- data/mpg123/src/libmpg123/synth_8bit.c +142 -0
- data/mpg123/src/libmpg123/synth_8bit.h +86 -0
- data/mpg123/src/libmpg123/synth_altivec.c +1057 -0
- data/mpg123/src/libmpg123/synth_arm.S +271 -0
- data/mpg123/src/libmpg123/synth_arm_accurate.S +287 -0
- data/mpg123/src/libmpg123/synth_i486.c +252 -0
- data/mpg123/src/libmpg123/synth_i586.S +336 -0
- data/mpg123/src/libmpg123/synth_i586_dither.S +375 -0
- data/mpg123/src/libmpg123/synth_mmx.S +125 -0
- data/mpg123/src/libmpg123/synth_mono.h +64 -0
- data/mpg123/src/libmpg123/synth_neon.S +123 -0
- data/mpg123/src/libmpg123/synth_neon_accurate.S +173 -0
- data/mpg123/src/libmpg123/synth_neon_float.S +149 -0
- data/mpg123/src/libmpg123/synth_neon_s32.S +168 -0
- data/mpg123/src/libmpg123/synth_ntom.h +213 -0
- data/mpg123/src/libmpg123/synth_real.c +404 -0
- data/mpg123/src/libmpg123/synth_s32.c +411 -0
- data/mpg123/src/libmpg123/synth_sse.S +6 -0
- data/mpg123/src/libmpg123/synth_sse3d.h +246 -0
- data/mpg123/src/libmpg123/synth_sse_accurate.S +294 -0
- data/mpg123/src/libmpg123/synth_sse_float.S +241 -0
- data/mpg123/src/libmpg123/synth_sse_s32.S +306 -0
- data/mpg123/src/libmpg123/synth_stereo_neon.S +175 -0
- data/mpg123/src/libmpg123/synth_stereo_neon_accurate.S +262 -0
- data/mpg123/src/libmpg123/synth_stereo_neon_float.S +220 -0
- data/mpg123/src/libmpg123/synth_stereo_neon_s32.S +247 -0
- data/mpg123/src/libmpg123/synth_stereo_sse_accurate.S +508 -0
- data/mpg123/src/libmpg123/synth_stereo_sse_float.S +416 -0
- data/mpg123/src/libmpg123/synth_stereo_sse_s32.S +540 -0
- data/mpg123/src/libmpg123/synth_stereo_x86_64.S +335 -0
- data/mpg123/src/libmpg123/synth_stereo_x86_64_accurate.S +454 -0
- data/mpg123/src/libmpg123/synth_stereo_x86_64_float.S +396 -0
- data/mpg123/src/libmpg123/synth_stereo_x86_64_s32.S +473 -0
- data/mpg123/src/libmpg123/synth_x86_64.S +244 -0
- data/mpg123/src/libmpg123/synth_x86_64_accurate.S +301 -0
- data/mpg123/src/libmpg123/synth_x86_64_float.S +259 -0
- data/mpg123/src/libmpg123/synth_x86_64_s32.S +312 -0
- data/mpg123/src/libmpg123/synths.h +52 -0
- data/mpg123/src/libmpg123/tabinit.c +294 -0
- data/mpg123/src/libmpg123/tabinit_mmx.S +210 -0
- data/mpg123/src/libmpg123/testcpu.c +35 -0
- data/mpg123/src/libmpg123/true.h +14 -0
- data/mpg123/src/local.c +63 -0
- data/mpg123/src/local.h +21 -0
- data/mpg123/src/metaprint.c +373 -0
- data/mpg123/src/metaprint.h +17 -0
- data/mpg123/src/module.c +306 -0
- data/mpg123/src/module.h +48 -0
- data/mpg123/src/mpg123.c +1405 -0
- data/mpg123/src/mpg123app.h +171 -0
- data/mpg123/src/output/Makefile.am +213 -0
- data/mpg123/src/output/Makefile.in +1238 -0
- data/mpg123/src/output/aix.c +300 -0
- data/mpg123/src/output/alib.c +209 -0
- data/mpg123/src/output/alsa.c +297 -0
- data/mpg123/src/output/arts.c +117 -0
- data/mpg123/src/output/coreaudio.c +370 -0
- data/mpg123/src/output/dummy.c +78 -0
- data/mpg123/src/output/esd.c +167 -0
- data/mpg123/src/output/hp.c +184 -0
- data/mpg123/src/output/jack.c +450 -0
- data/mpg123/src/output/mint.c +197 -0
- data/mpg123/src/output/nas.c +335 -0
- data/mpg123/src/output/openal.c +197 -0
- data/mpg123/src/output/os2.c +665 -0
- data/mpg123/src/output/oss.c +319 -0
- data/mpg123/src/output/portaudio.c +255 -0
- data/mpg123/src/output/pulse.c +164 -0
- data/mpg123/src/output/sdl.c +206 -0
- data/mpg123/src/output/sgi.c +213 -0
- data/mpg123/src/output/sndio.c +161 -0
- data/mpg123/src/output/sun.c +281 -0
- data/mpg123/src/output/win32.c +229 -0
- data/mpg123/src/playlist.c +596 -0
- data/mpg123/src/playlist.h +52 -0
- data/mpg123/src/resolver.c +319 -0
- data/mpg123/src/resolver.h +25 -0
- data/mpg123/src/sfifo.c +146 -0
- data/mpg123/src/sfifo.h +95 -0
- data/mpg123/src/streamdump.c +74 -0
- data/mpg123/src/streamdump.h +20 -0
- data/mpg123/src/term.c +479 -0
- data/mpg123/src/term.h +81 -0
- data/mpg123/src/tests/noise.c +52 -0
- data/mpg123/src/tests/plain_id3.c +109 -0
- data/mpg123/src/tests/seek_accuracy.c +261 -0
- data/mpg123/src/tests/seek_whence.c +56 -0
- data/mpg123/src/tests/testtext.h +34 -0
- data/mpg123/src/tests/text.c +80 -0
- data/mpg123/src/wav.c +464 -0
- data/mpg123/src/wavhead.h +68 -0
- data/mpg123/src/win32_net.c +599 -0
- data/mpg123/src/win32_support.c +191 -0
- data/mpg123/src/win32_support.h +152 -0
- data/mpg123/src/xfermem.c +321 -0
- data/mpg123/src/xfermem.h +74 -0
- data/mpg123/windows-builds.sh +137 -0
- data/msvc/lib/OpenAL32.lib +0 -0
- data/spec/fixtures/heal.ogg +0 -0
- data/spec/fixtures/tone_up.wav +0 -0
- data/spec/seal/buffer_spec.rb +37 -0
- data/spec/seal/core_spec.rb +29 -0
- data/spec/seal/effect_slot_spec.rb +38 -0
- data/spec/seal/listener_spec.rb +33 -0
- data/spec/seal/reverb_spec.rb +51 -0
- data/spec/seal/source_spec.rb +370 -0
- data/spec/seal/stream_spec.rb +38 -0
- data/spec/spec_helper.rb +45 -0
- data/spec/support/attribute_examples.rb +75 -0
- data/spec/support/audio_object_with_format.rb +27 -0
- data/spec/support/movable_object.rb +22 -0
- data/src/libogg/bitwise.c +857 -0
- data/src/libogg/framing.c +2093 -0
- data/src/libvorbis/backends.h +144 -0
- data/src/libvorbis/bitrate.c +253 -0
- data/src/libvorbis/bitrate.h +59 -0
- data/src/libvorbis/block.c +1046 -0
- data/src/libvorbis/codebook.c +484 -0
- data/src/libvorbis/codebook.h +119 -0
- data/src/libvorbis/codec_internal.h +167 -0
- data/src/libvorbis/envelope.c +375 -0
- data/src/libvorbis/envelope.h +80 -0
- data/src/libvorbis/floor0.c +221 -0
- data/src/libvorbis/floor1.c +1100 -0
- data/src/libvorbis/highlevel.h +58 -0
- data/src/libvorbis/info.c +668 -0
- data/src/libvorbis/lookup.c +94 -0
- data/src/libvorbis/lookup.h +32 -0
- data/src/libvorbis/lookup_data.h +192 -0
- data/src/libvorbis/lpc.c +160 -0
- data/src/libvorbis/lpc.h +29 -0
- data/src/libvorbis/lsp.c +456 -0
- data/src/libvorbis/lsp.h +28 -0
- data/src/libvorbis/mapping0.c +816 -0
- data/src/libvorbis/masking.h +785 -0
- data/src/libvorbis/mdct.c +563 -0
- data/src/libvorbis/mdct.h +71 -0
- data/src/libvorbis/misc.h +57 -0
- data/src/libvorbis/os.h +186 -0
- data/src/libvorbis/psy.c +1206 -0
- data/src/libvorbis/psy.h +154 -0
- data/src/libvorbis/registry.c +45 -0
- data/src/libvorbis/registry.h +32 -0
- data/src/libvorbis/res0.c +889 -0
- data/src/libvorbis/scales.h +90 -0
- data/src/libvorbis/sharedbook.c +579 -0
- data/src/libvorbis/smallft.c +1255 -0
- data/src/libvorbis/smallft.h +34 -0
- data/src/libvorbis/synthesis.c +184 -0
- data/src/libvorbis/vorbisfile.c +2337 -0
- data/src/libvorbis/window.c +2135 -0
- data/src/libvorbis/window.h +26 -0
- data/src/rubyext.c +2329 -0
- data/src/seal/buf.c +124 -0
- data/src/seal/core.c +283 -0
- data/src/seal/efs.c +74 -0
- data/src/seal/err.c +118 -0
- data/src/seal/fmt.c +86 -0
- data/src/seal/listener.c +111 -0
- data/src/seal/mpg.c +174 -0
- data/src/seal/mpg.h +24 -0
- data/src/seal/ov.c +180 -0
- data/src/seal/ov.h +22 -0
- data/src/seal/raw.c +59 -0
- data/src/seal/reader.c +102 -0
- data/src/seal/reader.h +59 -0
- data/src/seal/rvb.c +368 -0
- data/src/seal/src.c +654 -0
- data/src/seal/stream.c +109 -0
- data/src/seal/threading.c +66 -0
- data/src/seal/threading.h +20 -0
- data/src/seal/wav.c +297 -0
- data/src/seal/wav.h +23 -0
- data/src/win32api.rb +29 -0
- metadata +563 -0
@@ -0,0 +1,300 @@
|
|
1
|
+
/*
|
2
|
+
aix: Driver for IBM RS/6000 with AIX Ultimedia Services
|
3
|
+
|
4
|
+
copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
|
5
|
+
see COPYING and AUTHORS files in distribution or http://mpg123.org
|
6
|
+
initially written by Juergen Schoew and Tomas Oegren
|
7
|
+
*/
|
8
|
+
|
9
|
+
#include <stdio.h>
|
10
|
+
#include <unistd.h>
|
11
|
+
#include <stdlib.h>
|
12
|
+
|
13
|
+
#include <errno.h>
|
14
|
+
#include <fcntl.h>
|
15
|
+
#include <sys/audio.h>
|
16
|
+
#include <stropts.h>
|
17
|
+
#include <sys/types.h>
|
18
|
+
#include <sys/file.h>
|
19
|
+
#include <sys/stat.h>
|
20
|
+
#include <sys/param.h>
|
21
|
+
|
22
|
+
#include "mpg123app.h"
|
23
|
+
#include "debug.h"
|
24
|
+
|
25
|
+
/* use AUDIO_BSIZE to set the msec for audio buffering in Ultimedia library
|
26
|
+
*/
|
27
|
+
/* #define AUDIO_BSIZE AUDIO_IGNORE */
|
28
|
+
#define AUDIO_BSIZE 200
|
29
|
+
|
30
|
+
static int rate_best_match(audio_output_t *ao)
|
31
|
+
{
|
32
|
+
static long valid [ ] = { 5510, 6620, 8000, 9600, 11025, 16000, 18900,
|
33
|
+
22050, 27420, 32000, 33075, 37800, 44100, 48000, 0 };
|
34
|
+
int i = 0;
|
35
|
+
long best = 8000;
|
36
|
+
|
37
|
+
if(!ai || ao->fn < 0 || ao->rate < 0) {
|
38
|
+
return -1;
|
39
|
+
}
|
40
|
+
|
41
|
+
while (valid [i]) {
|
42
|
+
if (abs(valid[i] - ao->rate) < abs(best - ao->rate))
|
43
|
+
{
|
44
|
+
best = valid [i];
|
45
|
+
}
|
46
|
+
i = i + 1;
|
47
|
+
}
|
48
|
+
|
49
|
+
ao->rate = best;
|
50
|
+
return best;
|
51
|
+
}
|
52
|
+
|
53
|
+
static int reset_parameters(audio_output_t *ao)
|
54
|
+
{
|
55
|
+
audio_control acontrol;
|
56
|
+
audio_change achange;
|
57
|
+
audio_init ainit;
|
58
|
+
int ret;
|
59
|
+
|
60
|
+
memset ( & achange, '\0', sizeof (achange));
|
61
|
+
memset ( & acontrol, '\0', sizeof (acontrol));
|
62
|
+
|
63
|
+
achange.balance = 0x3fff0000;
|
64
|
+
achange.balance_delay = 0;
|
65
|
+
achange.volume = (long) (0x7fff << 16);
|
66
|
+
achange.volume_delay = 0;
|
67
|
+
achange.input = AUDIO_IGNORE;
|
68
|
+
if (ao->flags == -1) achange.output = INTERNAL_SPEAKER;
|
69
|
+
else achange.output = 0;
|
70
|
+
|
71
|
+
if(ao->flags & AUDIO_OUT_INTERNAL_SPEAKER)
|
72
|
+
achange.output |= INTERNAL_SPEAKER;
|
73
|
+
if(ao->flags & AUDIO_OUT_HEADPHONES)
|
74
|
+
achange.output |= EXTERNAL_SPEAKER;
|
75
|
+
if(ao->flags & AUDIO_OUT_LINE_OUT)
|
76
|
+
achange.output |= OUTPUT_1;
|
77
|
+
if(ao->flags == 0)
|
78
|
+
achange.output = AUDIO_IGNORE;
|
79
|
+
|
80
|
+
achange.treble = AUDIO_IGNORE;
|
81
|
+
achange.bass = AUDIO_IGNORE;
|
82
|
+
achange.pitch = AUDIO_IGNORE;
|
83
|
+
achange.monitor = AUDIO_IGNORE;
|
84
|
+
achange.dev_info = (char *) NULL;
|
85
|
+
|
86
|
+
acontrol.ioctl_request = AUDIO_CHANGE;
|
87
|
+
acontrol.position = 0;
|
88
|
+
acontrol.request_info = (char *) & achange;
|
89
|
+
|
90
|
+
ret = ioctl (ao->fn, AUDIO_CONTROL, & acontrol);
|
91
|
+
if (ret < 0)
|
92
|
+
return ret;
|
93
|
+
|
94
|
+
/* Init Device for new values */
|
95
|
+
if (ao->rate >0) {
|
96
|
+
memset ( & ainit, '\0', sizeof (ainit));
|
97
|
+
ainit.srate = rate_best_match(ai);
|
98
|
+
if (ao->channels > 0)
|
99
|
+
ainit.channels = ao->channels;
|
100
|
+
else
|
101
|
+
ainit.channels = 1;
|
102
|
+
switch (ao->format) {
|
103
|
+
default :
|
104
|
+
ainit.mode = PCM;
|
105
|
+
ainit.bits_per_sample = 8;
|
106
|
+
ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT;
|
107
|
+
break;
|
108
|
+
case MPG123_ENC_SIGNED_16:
|
109
|
+
ainit.mode = PCM;
|
110
|
+
ainit.bits_per_sample = 16;
|
111
|
+
ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT;
|
112
|
+
break;
|
113
|
+
case MPG123_ENC_SIGNED_8:
|
114
|
+
ainit.mode = PCM;
|
115
|
+
ainit.bits_per_sample = 8;
|
116
|
+
ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT;
|
117
|
+
break;
|
118
|
+
case MPG123_ENC_UNSIGNED_16:
|
119
|
+
ainit.mode = PCM;
|
120
|
+
ainit.bits_per_sample = 16;
|
121
|
+
ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT | SIGNED;
|
122
|
+
break;
|
123
|
+
case MPG123_ENC_UNSIGNED_8:
|
124
|
+
ainit.mode = PCM;
|
125
|
+
ainit.bits_per_sample = 8;
|
126
|
+
ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT | SIGNED;
|
127
|
+
break;
|
128
|
+
case MPG123_ENC_ULAW_8:
|
129
|
+
ainit.mode = MU_LAW;
|
130
|
+
ainit.bits_per_sample = 8;
|
131
|
+
ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT;
|
132
|
+
break;
|
133
|
+
case MPG123_ENC_ALAW_8:
|
134
|
+
ainit.mode = A_LAW;
|
135
|
+
ainit.bits_per_sample = 8;
|
136
|
+
ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT;
|
137
|
+
break;
|
138
|
+
}
|
139
|
+
ainit.operation = PLAY;
|
140
|
+
ainit.bsize = AUDIO_BSIZE;
|
141
|
+
|
142
|
+
ret = ioctl (ao->fn, AUDIO_INIT, & ainit);
|
143
|
+
if (ret < 0) {
|
144
|
+
error("Can't set new audio parameters!");
|
145
|
+
return ret;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
acontrol.ioctl_request = AUDIO_START;
|
150
|
+
acontrol.request_info = NULL;
|
151
|
+
acontrol.position = 0;
|
152
|
+
|
153
|
+
ret = ioctl (ao->fn, AUDIO_CONTROL, & acontrol);
|
154
|
+
if (ret < 0) {
|
155
|
+
error("Can't reset audio!");
|
156
|
+
return ret;
|
157
|
+
}
|
158
|
+
return 0;
|
159
|
+
}
|
160
|
+
|
161
|
+
static int open_aix(audio_output_t *ao)
|
162
|
+
{
|
163
|
+
audio_init ainit;
|
164
|
+
int ret;
|
165
|
+
|
166
|
+
if(!ao->device) {
|
167
|
+
if(getenv("AUDIODEV")) {
|
168
|
+
ao->device = getenv("AUDIODEV");
|
169
|
+
ao->fn = open(ao->device,O_WRONLY);
|
170
|
+
} else {
|
171
|
+
ao->device = "/dev/paud0/1"; /* paud0 for PCI */
|
172
|
+
ao->fn = open(ao->device,O_WRONLY);
|
173
|
+
if ((ao->fn == -1) & (errno == ENOENT)) {
|
174
|
+
ao->device = "/dev/baud0/1"; /* baud0 for MCA */
|
175
|
+
ao->fn = open(ao->device,O_WRONLY);
|
176
|
+
}
|
177
|
+
}
|
178
|
+
} else ao->fn = open(ao->device,O_WRONLY);
|
179
|
+
|
180
|
+
if(ao->fn < 0) {
|
181
|
+
error("Can't open audio device!");
|
182
|
+
return ao->fn;
|
183
|
+
}
|
184
|
+
|
185
|
+
/* Init to default values */
|
186
|
+
memset ( & ainit, '\0', sizeof (ainit));
|
187
|
+
ainit.srate = 44100;
|
188
|
+
ainit.channels = 2;
|
189
|
+
ainit.mode = PCM;
|
190
|
+
ainit.bits_per_sample = 16;
|
191
|
+
ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT;
|
192
|
+
ainit.operation = PLAY;
|
193
|
+
ainit.bsize = AUDIO_BSIZE;
|
194
|
+
|
195
|
+
ret = ioctl (ao->fn, AUDIO_INIT, & ainit);
|
196
|
+
if (ret < 0) return ret;
|
197
|
+
|
198
|
+
reset_parameters(ai);
|
199
|
+
return ao->fn;
|
200
|
+
}
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
static int get_formats_aix(audio_output_t *ao)
|
205
|
+
{
|
206
|
+
/* ULTIMEDIA DOCUMENTATION SAYS:
|
207
|
+
The Ultimedia Audio Adapter supports fourteen sample rates you can use to
|
208
|
+
capture and playback audio data. The rates are (in kHz): 5.51, 6.62, 8.0,
|
209
|
+
9.6, 11.025, 16.0, 18.9, 22.050, 27.42, 32.0, 33.075, 37.8, 44.1, and 48.0.
|
210
|
+
These rates are supported for mono and stereo PCM (8- and 16-bit), mu-law,
|
211
|
+
and A-law.
|
212
|
+
*/
|
213
|
+
|
214
|
+
long rate;
|
215
|
+
|
216
|
+
rate = ao->rate;
|
217
|
+
rate_best_match(ai);
|
218
|
+
if (ao->rate == rate)
|
219
|
+
return (MPG123_ENC_SIGNED_16|MPG123_ENC_UNSIGNED_16|
|
220
|
+
MPG123_ENC_UNSIGNED_8|MPG123_ENC_SIGNED_8|
|
221
|
+
MPG123_ENC_ULAW_8|MPG123_ENC_ALAW_8);
|
222
|
+
else
|
223
|
+
return 0;
|
224
|
+
}
|
225
|
+
|
226
|
+
static int write_aix(audio_output_t *ao,unsigned char *buf,int len)
|
227
|
+
{
|
228
|
+
return write(ao->fn,buf,len);
|
229
|
+
}
|
230
|
+
|
231
|
+
static int close_aix(audio_output_t *ao)
|
232
|
+
{
|
233
|
+
audio_control acontrol;
|
234
|
+
audio_buffer abuffer;
|
235
|
+
int ret,i;
|
236
|
+
|
237
|
+
/* Don't close the audio-device until it's played all its contents */
|
238
|
+
memset ( & acontrol, '\0', sizeof ( acontrol ) );
|
239
|
+
acontrol.request_info = &abuffer;
|
240
|
+
acontrol.position = 0;
|
241
|
+
i=50; /* Don't do this forever on a bad day :-) */
|
242
|
+
|
243
|
+
while (i-- > 0) {
|
244
|
+
if ((ioctl(ao->fn, AUDIO_BUFFER, &acontrol))< 0) {
|
245
|
+
error1("buffer read failed: %d", errno);
|
246
|
+
break;
|
247
|
+
} else {
|
248
|
+
if (abuffer.flags <= 0) break;
|
249
|
+
}
|
250
|
+
usleep(200000); /* sleep 0.2 sec */
|
251
|
+
}
|
252
|
+
|
253
|
+
memset ( & acontrol, '\0', sizeof ( acontrol ) );
|
254
|
+
acontrol.ioctl_request = AUDIO_STOP;
|
255
|
+
acontrol.request_info = NULL;
|
256
|
+
acontrol.position = 0;
|
257
|
+
|
258
|
+
ret = ioctl ( ao->fn, AUDIO_CONTROL, & acontrol );
|
259
|
+
if (ret < 0) error("Can't close audio!");
|
260
|
+
|
261
|
+
ret = close (ao->fn);
|
262
|
+
if (ret < 0) error("Can't close audio!");
|
263
|
+
|
264
|
+
return 0;
|
265
|
+
}
|
266
|
+
|
267
|
+
static void flush_aix(audio_output_t *ao)
|
268
|
+
{
|
269
|
+
}
|
270
|
+
|
271
|
+
static int init_aix(audio_output_t* ao)
|
272
|
+
{
|
273
|
+
if (ao==NULL) return -1;
|
274
|
+
|
275
|
+
/* Set callbacks */
|
276
|
+
ao->open = open_aix;
|
277
|
+
ao->flush = flush_aix;
|
278
|
+
ao->write = write_aix;
|
279
|
+
ao->get_formats = get_formats_aix;
|
280
|
+
ao->close = close_aix;
|
281
|
+
|
282
|
+
/* Success */
|
283
|
+
return 0;
|
284
|
+
}
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
/*
|
289
|
+
Module information data structure
|
290
|
+
*/
|
291
|
+
mpg123_module_t mpg123_output_module_info = {
|
292
|
+
/* api_version */ MPG123_MODULE_API_VERSION,
|
293
|
+
/* name */ "AIX",
|
294
|
+
/* description */ "Output audio on IBM RS/6000 with AIX Ultimedia Services.",
|
295
|
+
/* revision */ "$Rev: 932 $",
|
296
|
+
/* handle */ NULL,
|
297
|
+
|
298
|
+
/* init_output */ init_aix,
|
299
|
+
};
|
300
|
+
|
@@ -0,0 +1,209 @@
|
|
1
|
+
/*
|
2
|
+
alib: audio output for HP-UX using alib
|
3
|
+
|
4
|
+
copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
|
5
|
+
see COPYING and AUTHORS files in distribution or http://mpg123.org
|
6
|
+
initially written by Erwan Ducroquet
|
7
|
+
based on source code from HP (Audio SDK)
|
8
|
+
*/
|
9
|
+
|
10
|
+
/*
|
11
|
+
*
|
12
|
+
* for mpg123 :
|
13
|
+
* hpux:
|
14
|
+
* $(MAKE) \
|
15
|
+
* CC=cc \
|
16
|
+
* LDFLAGS=-L/opt/audio/lib \
|
17
|
+
* AUDIO_LIB=-lAlib \
|
18
|
+
* OBJECTS=decode.o dct64.o \
|
19
|
+
* CFLAGS=-Ae +O3 -DREAL_IS_FLOAT -D_HPUX_SOURCE -DHPUX -I/opt/audio/include \
|
20
|
+
* mpg123
|
21
|
+
*/
|
22
|
+
|
23
|
+
|
24
|
+
/*
|
25
|
+
* For the user :
|
26
|
+
* If you launch mpg123 on a XTerm with sound capabilities, it's OK
|
27
|
+
* Else, you have to set the environment variable "AUDIO" to the name of
|
28
|
+
* an HP Xterm with sound card.
|
29
|
+
*/
|
30
|
+
|
31
|
+
/**************************************************************************/
|
32
|
+
|
33
|
+
#include "mpg123app.h"
|
34
|
+
|
35
|
+
#include <fcntl.h>
|
36
|
+
|
37
|
+
#include <sys/socket.h>
|
38
|
+
#include <netdb.h>
|
39
|
+
#include <netinet/in.h>
|
40
|
+
#include <netinet/tcp.h>
|
41
|
+
#include <errno.h>
|
42
|
+
|
43
|
+
|
44
|
+
#include <Alib.h> /* /opt/audio/include */
|
45
|
+
#include <CUlib.h> /* /opt/audio/include */
|
46
|
+
|
47
|
+
#include "debug.h"
|
48
|
+
|
49
|
+
/**************************************************************************/
|
50
|
+
|
51
|
+
|
52
|
+
/* FIXME: These globals should be moved into a structure */
|
53
|
+
static Audio *audioServer = (Audio *) NULL;
|
54
|
+
static struct protoent *tcpProtocolEntry;
|
55
|
+
static ATransID xid;
|
56
|
+
|
57
|
+
static void printAudioError(Audio *audio,char *message,int errorCode) {
|
58
|
+
char errorbuff[132];
|
59
|
+
AGetErrorText(audio, errorCode, errorbuff, 131);
|
60
|
+
error2("%s: %s", message, errorbuff);
|
61
|
+
}
|
62
|
+
static long myHandler(Audio *audio,AErrorEvent *err_event) {
|
63
|
+
printAudioError( audio, "Audio error", err_event->error_code );
|
64
|
+
/* we cannot just do random exists, that messes terminal up
|
65
|
+
need proper error propagation in that case for future, setting intflag or such */
|
66
|
+
/* exit(1); */
|
67
|
+
}
|
68
|
+
|
69
|
+
/**************************************************************************/
|
70
|
+
|
71
|
+
/*
|
72
|
+
* Set the fn element of ai
|
73
|
+
* Use ao->rate and ao->channels
|
74
|
+
* Doesn't set any volume
|
75
|
+
*/
|
76
|
+
|
77
|
+
/* return on error leaves stuff dirty here... */
|
78
|
+
static int open_alib(audio_output_t *ao)
|
79
|
+
{
|
80
|
+
AudioAttributes Attribs;
|
81
|
+
AudioAttrMask AttribsMask;
|
82
|
+
AGainEntry gainEntry[4];
|
83
|
+
SSPlayParams playParams;
|
84
|
+
SStream audioStream;
|
85
|
+
AErrorHandler prevHandler;
|
86
|
+
char server[1];
|
87
|
+
int i;
|
88
|
+
long status;
|
89
|
+
|
90
|
+
if (audioServer) {
|
91
|
+
error("openAudio: audio already open");
|
92
|
+
return -1;
|
93
|
+
}
|
94
|
+
|
95
|
+
prevHandler = ASetErrorHandler(myHandler);
|
96
|
+
|
97
|
+
server[0] = '\0';
|
98
|
+
audioServer = AOpenAudio( server, NULL );
|
99
|
+
if (audioServer==NULL) {
|
100
|
+
error("Error: could not open audio\n");
|
101
|
+
return -1;
|
102
|
+
}
|
103
|
+
|
104
|
+
ao->fn = socket( AF_INET, SOCK_STREAM, 0 );
|
105
|
+
if(ao->fn<0) {
|
106
|
+
error("Socket creation failed");
|
107
|
+
return -1;
|
108
|
+
}
|
109
|
+
|
110
|
+
Attribs.type = ATSampled;
|
111
|
+
Attribs.attr.sampled_attr.sampling_rate = ao->rate;
|
112
|
+
Attribs.attr.sampled_attr.channels = ao->channels;
|
113
|
+
Attribs.attr.sampled_attr.data_format = ADFLin16;
|
114
|
+
AttribsMask = ASSamplingRateMask | ASChannelsMask | ASDataFormatMask;
|
115
|
+
|
116
|
+
gainEntry[0].gain = AUnityGain;
|
117
|
+
gainEntry[0].u.o.out_ch = AOCTMono;
|
118
|
+
gainEntry[0].u.o.out_dst = AODTDefaultOutput;
|
119
|
+
|
120
|
+
playParams.gain_matrix.type = AGMTOutput; /* gain matrix */
|
121
|
+
playParams.gain_matrix.num_entries = 1;
|
122
|
+
playParams.gain_matrix.gain_entries = gainEntry;
|
123
|
+
playParams.play_volume = AUnityGain; /* play volume */
|
124
|
+
playParams.priority = APriorityNormal; /* normal priority */
|
125
|
+
playParams.event_mask = 0; /* don't solicit any events */
|
126
|
+
|
127
|
+
xid=APlaySStream(audioServer,AttribsMask,&Attribs,
|
128
|
+
&playParams,&audioStream,NULL);
|
129
|
+
|
130
|
+
status=connect(ao->fn,
|
131
|
+
(struct sockaddr *) &audioStream.tcp_sockaddr,
|
132
|
+
sizeof(struct sockaddr_in) );
|
133
|
+
if (status<0) {
|
134
|
+
error("Connect failed");
|
135
|
+
return -1;
|
136
|
+
}
|
137
|
+
|
138
|
+
i=-1;
|
139
|
+
tcpProtocolEntry=getprotobyname("tcp");
|
140
|
+
setsockopt(ao->fn,tcpProtocolEntry->p_proto,TCP_NODELAY,&i,sizeof(i));
|
141
|
+
|
142
|
+
return ao->fn;
|
143
|
+
}
|
144
|
+
|
145
|
+
/**************************************************************************/
|
146
|
+
|
147
|
+
static int close_alib(audio_output_t *ao)
|
148
|
+
{
|
149
|
+
close(ao->fn);
|
150
|
+
ASetCloseDownMode( audioServer, AKeepTransactions, NULL );
|
151
|
+
ACloseAudio( audioServer, NULL );
|
152
|
+
audioServer = (Audio *) NULL;
|
153
|
+
return 0;
|
154
|
+
}
|
155
|
+
|
156
|
+
/**************************************************************************/
|
157
|
+
|
158
|
+
/*
|
159
|
+
* very simple
|
160
|
+
* deserv to be inline
|
161
|
+
*/
|
162
|
+
|
163
|
+
static int write_alib(audio_output_t *ao,unsigned char *buf,int len)
|
164
|
+
{
|
165
|
+
return write(ao->fn,buf,len*2);
|
166
|
+
}
|
167
|
+
|
168
|
+
/**************************************************************************/
|
169
|
+
|
170
|
+
static int get_formats_alib(audio_output_t *ao)
|
171
|
+
{
|
172
|
+
return MPG123_ENC_SIGNED_16;
|
173
|
+
}
|
174
|
+
|
175
|
+
static void flush_alib(audio_output_t *ao)
|
176
|
+
{
|
177
|
+
}
|
178
|
+
|
179
|
+
|
180
|
+
static int init_alib(audio_output_t* ao)
|
181
|
+
{
|
182
|
+
if (ao==NULL) return -1;
|
183
|
+
|
184
|
+
/* Set callbacks */
|
185
|
+
ao->open = open_alib;
|
186
|
+
ao->flush = flush_alib;
|
187
|
+
ao->write = write_alib;
|
188
|
+
ao->get_formats = get_formats_alib;
|
189
|
+
ao->close = close_alib;
|
190
|
+
|
191
|
+
/* Success */
|
192
|
+
return 0;
|
193
|
+
}
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
/*
|
198
|
+
Module information data structure
|
199
|
+
*/
|
200
|
+
mpg123_module_t mpg123_output_module_info = {
|
201
|
+
/* api_version */ MPG123_MODULE_API_VERSION,
|
202
|
+
/* name */ "alib",
|
203
|
+
/* description */ "Output audio HP-UX using alib.",
|
204
|
+
/* revision */ "$Rev:$",
|
205
|
+
/* handle */ NULL,
|
206
|
+
|
207
|
+
/* init_output */ init_alib,
|
208
|
+
};
|
209
|
+
|