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
data/include/seal/src.h
ADDED
@@ -0,0 +1,413 @@
|
|
1
|
+
/*
|
2
|
+
* src.h is part of the Scorched End Audio Library (SEAL) and is licensed
|
3
|
+
* under the terms of the GNU Lesser General Public License. See COPYING
|
4
|
+
* attached with the library.
|
5
|
+
*
|
6
|
+
* src.h wraps up the abstract data type `seal_src_t'. Sources are abstract
|
7
|
+
* representations of sound sources which emit sound in Euclidean space.
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef _SEAL_SRC_H_
|
11
|
+
#define _SEAL_SRC_H_
|
12
|
+
|
13
|
+
#include <stddef.h>
|
14
|
+
#include "buf.h"
|
15
|
+
#include "stream.h"
|
16
|
+
#include "err.h"
|
17
|
+
|
18
|
+
/*
|
19
|
+
* A just-initialized source is of the `SEAL_UNDETERMINED' type. A source that
|
20
|
+
* attaches a buffer through `seal_set_src_buf' will become the `SEAL_STATIC'
|
21
|
+
* type. A source that streams audio from file through `seal_set_src_stream'
|
22
|
+
* will become the `SEAL_STREAMING' type.
|
23
|
+
*/
|
24
|
+
enum seal_src_type_t
|
25
|
+
{
|
26
|
+
SEAL_UNDETERMINED,
|
27
|
+
SEAL_STATIC,
|
28
|
+
SEAL_STREAMING
|
29
|
+
};
|
30
|
+
|
31
|
+
/*
|
32
|
+
* A just-initialized source is in the `SEAL_INITIAL' state. After a call to
|
33
|
+
* `seal_play_src', the source will enter the `SEAL_PLAYING' state. After a
|
34
|
+
* call to `seal_pause_src', the source will enter the `SEAL_PAUSED' state.
|
35
|
+
* After a call to `seal_stop_src', the source will enter the `SEAL_STOPPED'
|
36
|
+
* state.
|
37
|
+
*/
|
38
|
+
enum seal_src_state_t
|
39
|
+
{
|
40
|
+
SEAL_INITIAL,
|
41
|
+
SEAL_PLAYING,
|
42
|
+
SEAL_PAUSED,
|
43
|
+
SEAL_STOPPED
|
44
|
+
};
|
45
|
+
|
46
|
+
typedef struct seal_src_t seal_src_t;
|
47
|
+
typedef enum seal_src_type_t seal_src_type_t;
|
48
|
+
typedef enum seal_src_state_t seal_src_state_t;
|
49
|
+
|
50
|
+
#ifdef __cplusplus
|
51
|
+
extern "C" {
|
52
|
+
#endif
|
53
|
+
|
54
|
+
/*
|
55
|
+
* Initializes a new source. If the source is no longer needed, call
|
56
|
+
* `seal_destroy_source' to release any resource used by the source.
|
57
|
+
*
|
58
|
+
* @param src the source to initialize
|
59
|
+
*/
|
60
|
+
seal_err_t seal_init_src(seal_src_t*);
|
61
|
+
|
62
|
+
/*
|
63
|
+
* Destroys a source. Will not free the associated buffer or stream. Can
|
64
|
+
* be applied on sources in any state and will automatically stop any
|
65
|
+
* playback.
|
66
|
+
*
|
67
|
+
* @param src the source to destroy
|
68
|
+
*/
|
69
|
+
seal_err_t seal_destroy_src(seal_src_t*);
|
70
|
+
|
71
|
+
/*
|
72
|
+
* Starts to play a source. Applying to a `SEAL_PLAYING' source will restart
|
73
|
+
* the playback from the beginning thus reset the sampling offset too. If the
|
74
|
+
* source is a streaming source, restarting the playback will automatically
|
75
|
+
* rewind the stream to the beginning. Applying to a `SEAL_INITIAL' or
|
76
|
+
* `SEAL_STOPPED' source will start start playing and change its state to
|
77
|
+
* `SEAL_PLAYING'. Applying to a `SEAL_PAUSED' source will resume playing and
|
78
|
+
* change its state to `SEAL_PLAYING'.
|
79
|
+
*
|
80
|
+
* @param src the source to play
|
81
|
+
*/
|
82
|
+
seal_err_t seal_play_src(seal_src_t*);
|
83
|
+
|
84
|
+
/*
|
85
|
+
* Pauses the playing of a source. Applying to a `SEAL_PLAYING' source will
|
86
|
+
* change its state to `SEAL_PAUSED'. Applying to a `SEAL_INITIAL',
|
87
|
+
* `SEAL_PAUSED' or `SEAL_STOPPED' source has no effect.
|
88
|
+
*
|
89
|
+
* @param src the source to pause
|
90
|
+
*/
|
91
|
+
seal_err_t seal_pause_src(seal_src_t*);
|
92
|
+
|
93
|
+
/*
|
94
|
+
* Stops the playing of a source. Applying to a `SEAL_PLAYING' or
|
95
|
+
* `SEAL_PAUSED' source will change its state to `SEAL_STOPPED'. Applying to a
|
96
|
+
* `SEAL_INITIAL' or `SEAL_STOPPED' source has no effect. Resets the sampling
|
97
|
+
* offset.
|
98
|
+
*
|
99
|
+
* @param src the source to stop
|
100
|
+
*/
|
101
|
+
seal_err_t seal_stop_src(seal_src_t*);
|
102
|
+
|
103
|
+
/*
|
104
|
+
* Rewinds a source to the beginning. Applying to a `SEAL_PLAYING',
|
105
|
+
* `SEAL_PAUSED' or `SEAL_STOPPED' source will change its state to
|
106
|
+
* `SEAL_INITIAL'. Applying to a `SEAL_INITIAL' source has no effect. The
|
107
|
+
* sampling offset will be reset to the beginning. Other attributes are
|
108
|
+
* preserved.
|
109
|
+
*
|
110
|
+
* @param src the source to rewind
|
111
|
+
*/
|
112
|
+
seal_err_t seal_rewind_src(seal_src_t*);
|
113
|
+
|
114
|
+
/*
|
115
|
+
* Associates a buffer with a source so that the source is ready to play the
|
116
|
+
* audio contained in the buffer. Can be applied only to sources in the
|
117
|
+
* `SEAL_INITIAL' or `SEAL_STOPPED' states and that are not of the
|
118
|
+
* `SEAL_STREAMING' type. If successful, the source will become or remain the
|
119
|
+
* `SEAL_STATIC' type.
|
120
|
+
*
|
121
|
+
* @param src the source to associate the buffer `buf' with
|
122
|
+
* @param buf the buffer to associate the source `src' with
|
123
|
+
*/
|
124
|
+
seal_err_t seal_set_src_buf(seal_src_t*, seal_buf_t*);
|
125
|
+
|
126
|
+
/*
|
127
|
+
* Associates an opened stream with a source so that audio data can be
|
128
|
+
* continuously fetched from a file rather than loading everything to memory
|
129
|
+
* at once. Can be applied to sources in any playing state but not on the
|
130
|
+
* `SEAL_STATIC' type of source. When replacing an attached stream, the new
|
131
|
+
* stream must have the same audio format as the old one. Also be aware of the
|
132
|
+
* fact that in this case there could still be some chunks of the old stream
|
133
|
+
* at the front of the streaming queue waiting to be played. If successful,
|
134
|
+
* the source will become or remain the `SEAL_STREAMING' type. The streaming
|
135
|
+
* queue will be filled after this call returns; after the queue starts to be
|
136
|
+
* played, `seal_update_src' should be called to refill the queue.
|
137
|
+
*
|
138
|
+
* @param src the source to associate the stream `stream' with
|
139
|
+
* @param stream the stream to associate the source `src' with
|
140
|
+
*/
|
141
|
+
seal_err_t seal_set_src_stream(seal_src_t*, seal_stream_t*);
|
142
|
+
|
143
|
+
/*
|
144
|
+
* Updates a streaming source. If the source is not up-to-date, the playback
|
145
|
+
* will end before the end of the stream is reached. Does nothing if the
|
146
|
+
* passed-in source is not a streaming source. Also does nothing if auto
|
147
|
+
* update is on.
|
148
|
+
*
|
149
|
+
* @param src the source to update
|
150
|
+
*/
|
151
|
+
seal_err_t seal_update_src(seal_src_t*);
|
152
|
+
|
153
|
+
/*
|
154
|
+
* Releases the current buffer or stream from a source (hence empties the
|
155
|
+
* queue for streaming sources). Will reset the source type to
|
156
|
+
* `SEAL_UNDETERMINED' and the source state to `SEAL_STOPPED'. Will not free
|
157
|
+
* the associated buffer or stream.
|
158
|
+
*
|
159
|
+
* @param src the source to detach the audio of
|
160
|
+
*/
|
161
|
+
seal_err_t seal_detach_src_audio(seal_src_t*);
|
162
|
+
|
163
|
+
/*
|
164
|
+
* Sets the size of the streaming queue internally used by a source. The queue
|
165
|
+
* maintains a multiple buffering mechanism when streaming the audio data.
|
166
|
+
* Multiple bufferring allows buffers in the queue to be processed while the
|
167
|
+
* one at the front of the queue is still being played. A queue of size 2
|
168
|
+
* (double buffering) may still be inefficient in CPU- and I/O-bound
|
169
|
+
* situations while triple, or even quad buffering generally produces better
|
170
|
+
* sound quality in non-memory-bound situations.
|
171
|
+
*
|
172
|
+
* @param src the source to set the queue size of
|
173
|
+
* @param size the queue size in the interval [2, 63]
|
174
|
+
*/
|
175
|
+
seal_err_t seal_set_src_queue_size(seal_src_t*, size_t);
|
176
|
+
|
177
|
+
/*
|
178
|
+
* Sets the maximum size, in byte, of the audio chunk which buffers the audio
|
179
|
+
* data constantly fetched from an audio stream. Using small chunks may cause
|
180
|
+
* playback to occur before the required audio chunk is ready, which in turn
|
181
|
+
* causes unexpected stop of playback.
|
182
|
+
*
|
183
|
+
* @param src the source to set the chunk size of
|
184
|
+
* @param size the chunk size in the interval [9216, 16773120]; must be a
|
185
|
+
* multiple of 9216; non-multiple value will be adjusted to the
|
186
|
+
* closest smaller multiple automatically
|
187
|
+
*/
|
188
|
+
seal_err_t seal_set_src_chunk_size(seal_src_t*, size_t);
|
189
|
+
|
190
|
+
/*
|
191
|
+
* Sets the position of a source in a right-handed Cartesian coordinate
|
192
|
+
* system. Use of NaN and infinity is undefined.
|
193
|
+
*
|
194
|
+
* @param src the source to set the position of
|
195
|
+
* @param x the x position to set
|
196
|
+
* @param y the y position to set
|
197
|
+
* @param z the z position to set
|
198
|
+
*/
|
199
|
+
seal_err_t seal_set_src_pos(seal_src_t*, float /*x*/, float /*y*/,
|
200
|
+
float /*z*/);
|
201
|
+
|
202
|
+
/*
|
203
|
+
* Sets the velocity of a source in a right-handed Cartesian coordinate
|
204
|
+
* system. The velocity of the source does not affect its position but is a
|
205
|
+
* factor used during the Doppler effect emulation. Use of NaN is undefined.
|
206
|
+
*
|
207
|
+
* @param src the source to set the velocity of
|
208
|
+
* @param x the x velocity to set
|
209
|
+
* @param y the y velocity to set
|
210
|
+
* @param z the z velocity to set
|
211
|
+
*/
|
212
|
+
seal_err_t seal_set_src_vel(seal_src_t*, float /*x*/, float /*y*/,
|
213
|
+
float /*z*/);
|
214
|
+
|
215
|
+
/*
|
216
|
+
* Sets the pitch shift multiplier of a source. 1.0f means identity; each
|
217
|
+
* reduction by 1/2 means a pitch shift of -12 semitones; each doubling means
|
218
|
+
* a pitch shift of 12 semitones. Use of 0.0f is undefined.
|
219
|
+
*
|
220
|
+
* @param src the source to set the pitch of
|
221
|
+
* @param pitch the pitch multiplier in the interval (0.0f, +inf.)
|
222
|
+
*/
|
223
|
+
seal_err_t seal_set_src_pitch(seal_src_t*, float /*pitch*/);
|
224
|
+
|
225
|
+
/*
|
226
|
+
* Sets the scalar amplitude multiplier of a source. 1.0f means that the sound
|
227
|
+
* is unattenuated; 0.5f means an attenuation of 6 dB; 0.0f means silence.
|
228
|
+
*
|
229
|
+
* @param src the source to set the gain of
|
230
|
+
* @param gain the scalar amplitude multiplier in the interval [0.0f, +inf.)
|
231
|
+
*/
|
232
|
+
seal_err_t seal_set_src_gain(seal_src_t*, float /*gain*/);
|
233
|
+
|
234
|
+
/*
|
235
|
+
* Sets whether a source should be automatically updated asynchronously by a
|
236
|
+
* background thread. If this thread is running, user calls to seal_update_src
|
237
|
+
* does nothing. If auto update is disabled after it is enabled, it will take
|
238
|
+
* effect the next time the source gets played.
|
239
|
+
*
|
240
|
+
* @param src the source to set the auto update flag of
|
241
|
+
* @param automatic 1 to set it auto update or otherwise 0
|
242
|
+
*/
|
243
|
+
seal_err_t seal_set_src_auto(seal_src_t*, char /*automatic*/);
|
244
|
+
|
245
|
+
/*
|
246
|
+
* Sets whether a source's position, velocity, cone and direction are all
|
247
|
+
* relative to the listener position.
|
248
|
+
*
|
249
|
+
* @param src the source to set the relative flag of
|
250
|
+
* @param relative 1 to set it relative to the listener or otherwise 0
|
251
|
+
* @return nonzero if successful or otherwise 0
|
252
|
+
*/
|
253
|
+
seal_err_t seal_set_src_relative(seal_src_t*, char /*relative*/);
|
254
|
+
|
255
|
+
/*
|
256
|
+
* Sets whether the playback of a source is looping. A looping source will
|
257
|
+
* never enter the `SEAL_STOPPED' state; it will immediate enter
|
258
|
+
* `SEAL_INITIAL' and then SEAL_PLAYING after it reaches the end of the last
|
259
|
+
* buffer.
|
260
|
+
*
|
261
|
+
* @param src the source to set the looping flag of
|
262
|
+
* @param looping 1 to set it looping or otherwise 0
|
263
|
+
*/
|
264
|
+
seal_err_t seal_set_src_looping(seal_src_t*, char /*looping*/);
|
265
|
+
|
266
|
+
/*
|
267
|
+
* Gets the buffer of a source. The default is 0 (null pointer).
|
268
|
+
*
|
269
|
+
* @see seal_set_src_buffer
|
270
|
+
* @param src the source to get the buffer of
|
271
|
+
* @return the buffer
|
272
|
+
*/
|
273
|
+
seal_buf_t* seal_get_src_buf(seal_src_t*);
|
274
|
+
|
275
|
+
/*
|
276
|
+
* Gets the stream of a source. The default is 0 (null pointer).
|
277
|
+
*
|
278
|
+
* @see seal_set_src_stream
|
279
|
+
* @param src the source to get the stream of
|
280
|
+
* @return the receiver of the stream
|
281
|
+
*/
|
282
|
+
seal_stream_t* seal_get_src_stream(seal_src_t*);
|
283
|
+
|
284
|
+
/*
|
285
|
+
* Gets the size, in byte, of a source's streaming queue. The default is 3.
|
286
|
+
*
|
287
|
+
* @see seal_set_src_queue_size
|
288
|
+
* @param src the source to get the queue size of
|
289
|
+
* @param psize the receiver of the the queue size
|
290
|
+
*/
|
291
|
+
seal_err_t seal_get_src_queue_size(seal_src_t*, size_t* /*psize*/);
|
292
|
+
|
293
|
+
/*
|
294
|
+
* Gets the size, in byte, of a source's streaming chunk. The default is
|
295
|
+
* 36864.
|
296
|
+
*
|
297
|
+
* @see seal_set_src_chunk_size
|
298
|
+
* @param src the source to get the chunk size of
|
299
|
+
* @param psize the receiver of the chunk size
|
300
|
+
*/
|
301
|
+
seal_err_t seal_get_src_chunk_size(seal_src_t*, size_t* /*psize*/);
|
302
|
+
|
303
|
+
/*
|
304
|
+
* Gets the position of a source. The default is ( 0.0f, 0.0f, 0.0f ).
|
305
|
+
*
|
306
|
+
* @see seal_set_src_pos
|
307
|
+
* @param src the source to get the position of
|
308
|
+
* @param px the receiver of the x position
|
309
|
+
* @param py the receiver of the y position
|
310
|
+
* @param pz the receiver of the z position
|
311
|
+
*/
|
312
|
+
seal_err_t seal_get_src_pos(seal_src_t*, float* /*px*/, float* /*py*/,
|
313
|
+
float* /*pz*/);
|
314
|
+
|
315
|
+
/*
|
316
|
+
* Gets the velocity of a source. The default is ( 0.0f, 0.0f, 0.0f ).
|
317
|
+
*
|
318
|
+
* @see seal_set_src_vel
|
319
|
+
* @param src the source to get the velocity of
|
320
|
+
* @param px the receiver of the x velocity
|
321
|
+
* @param py the receiver of the y velocity
|
322
|
+
* @param pz the receiver of the z velocity
|
323
|
+
*/
|
324
|
+
seal_err_t seal_get_src_vel(seal_src_t*, float* /*px*/, float* /*py*/,
|
325
|
+
float* /*pz*/);
|
326
|
+
|
327
|
+
/*
|
328
|
+
* Gets the pitch of a source. The default is 1.0f.
|
329
|
+
*
|
330
|
+
* @see seal_set_src_pitch
|
331
|
+
* @param src the source to get the pitch of
|
332
|
+
* @param ppitch the receiver of the pitch
|
333
|
+
*/
|
334
|
+
seal_err_t seal_get_src_pitch(seal_src_t*, float* /*ppitch*/);
|
335
|
+
|
336
|
+
/*
|
337
|
+
* Gets the gain of a source. The default is 1.0f.
|
338
|
+
*
|
339
|
+
* @see seal_set_src_gain
|
340
|
+
* @param src the source to get the gain of
|
341
|
+
* @param pgain the receiver of the gain
|
342
|
+
*/
|
343
|
+
seal_err_t seal_get_src_gain(seal_src_t*, float* /*pgain*/);
|
344
|
+
|
345
|
+
/*
|
346
|
+
* Determines if a source is automatically updated. The default is true
|
347
|
+
* (nonzero).
|
348
|
+
*
|
349
|
+
* @see seal_set_src_auto
|
350
|
+
* @param src the source to determine
|
351
|
+
* @param pauto the receiver of the auto update flag
|
352
|
+
*/
|
353
|
+
seal_err_t seal_is_src_auto(seal_src_t*, char* /*pauto*/);
|
354
|
+
|
355
|
+
/*
|
356
|
+
* Determines if a source is relative. The default is false (0).
|
357
|
+
*
|
358
|
+
* @see seal_set_src_relative
|
359
|
+
* @param src the source to determine
|
360
|
+
* @param prelative the receiver of the relative flag
|
361
|
+
*/
|
362
|
+
seal_err_t seal_is_src_relative(seal_src_t*, char* /*prelative*/);
|
363
|
+
|
364
|
+
/*
|
365
|
+
* Determines if a source is looping. The default is false (0).
|
366
|
+
*
|
367
|
+
* @see seal_set_src_looping
|
368
|
+
* @param src the source to determine
|
369
|
+
* @param plooping the receiver of the looping flag
|
370
|
+
*/
|
371
|
+
seal_err_t seal_is_src_looping(seal_src_t*, char* /*plooping*/);
|
372
|
+
|
373
|
+
/*
|
374
|
+
* Gets the type of a source.
|
375
|
+
*
|
376
|
+
* @see enum seal_src_type_t
|
377
|
+
* @param src the source to get the source type of
|
378
|
+
* @param ptype the receiver of the source type
|
379
|
+
*/
|
380
|
+
seal_err_t seal_get_src_type(seal_src_t*, seal_src_type_t* /*ptype*/);
|
381
|
+
|
382
|
+
/*
|
383
|
+
* Gets the state of a source.
|
384
|
+
*
|
385
|
+
* @see enum seal_src_state_t
|
386
|
+
* @param src the source to get the state of
|
387
|
+
* @param pstate the receiver of the source state
|
388
|
+
*/
|
389
|
+
seal_err_t seal_get_src_state(seal_src_t*, seal_src_state_t* /*pstate*/);
|
390
|
+
|
391
|
+
#ifdef __cplusplus
|
392
|
+
}
|
393
|
+
#endif
|
394
|
+
|
395
|
+
/*
|
396
|
+
*****************************************************************************
|
397
|
+
* Below are **implementation details**.
|
398
|
+
*****************************************************************************
|
399
|
+
*/
|
400
|
+
|
401
|
+
struct seal_src_t
|
402
|
+
{
|
403
|
+
unsigned int id;
|
404
|
+
seal_buf_t* buf;
|
405
|
+
seal_stream_t* stream;
|
406
|
+
void* updater;
|
407
|
+
size_t chunk_size : 24;
|
408
|
+
size_t queue_size : 6;
|
409
|
+
unsigned int looping : 1;
|
410
|
+
unsigned int automatic : 1;
|
411
|
+
};
|
412
|
+
|
413
|
+
#endif /* _SEAL_SRC_H_ */
|
@@ -0,0 +1,81 @@
|
|
1
|
+
/*
|
2
|
+
* stream.h is part of the Scorched End Audio Library (SEAL) and is licensed
|
3
|
+
* under the terms of the GNU Lesser General Public License. See COPYING
|
4
|
+
* attached with the library.
|
5
|
+
*
|
6
|
+
* stream.h wraps up the `seal_stream_t' data type used by streaming sources.
|
7
|
+
* It is the front end for various decoders.
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef _SEAL_STREAM_H_
|
11
|
+
#define _SEAL_STREAM_H_
|
12
|
+
|
13
|
+
#include <stddef.h>
|
14
|
+
#include "raw.h"
|
15
|
+
#include "fmt.h"
|
16
|
+
|
17
|
+
/* Audio stream data. */
|
18
|
+
typedef struct seal_stream_t seal_stream_t;
|
19
|
+
|
20
|
+
#ifdef __cplusplus
|
21
|
+
extern "C" {
|
22
|
+
#endif
|
23
|
+
|
24
|
+
/*
|
25
|
+
* Opens a stream from the passed-in file. If the stream is no longer needed,
|
26
|
+
* call `seal_close_stream' to release the resources used by the stream.
|
27
|
+
*
|
28
|
+
* @param stream the stream to open
|
29
|
+
* @param filename the filename of the audio
|
30
|
+
* @param fmt the format of the audio file; automatic recognition of the
|
31
|
+
* audio format will be attempted if the passed-in `fmt' is
|
32
|
+
* `SEAL_UNKNOWN_FMT'
|
33
|
+
*/
|
34
|
+
seal_err_t seal_open_stream(seal_stream_t*, const char* /*filename*/,
|
35
|
+
seal_fmt_t);
|
36
|
+
|
37
|
+
/*
|
38
|
+
* Streams from an opened stream.
|
39
|
+
*
|
40
|
+
* @param stream the opened stream to stream from; will be left untouched
|
41
|
+
* if an error occurs
|
42
|
+
* @param raw the receiver of the streamed PCM data; if the size of the
|
43
|
+
* streamed data is not zero, `raw->data' will be dynamically
|
44
|
+
* allocated so the caller is responsible for deallocating
|
45
|
+
* it; `raw->size' should be set to the desired size, in
|
46
|
+
* bytes, of PCM data to stream prior to this call and will
|
47
|
+
* be adjusted to the actual size, if not zero, of streamed
|
48
|
+
* data; will be left untouched if an error occurs
|
49
|
+
* @param psize the receiver of the actual size, in bytes, of streamed
|
50
|
+
* data if successful or otherwise a negative integer
|
51
|
+
*/
|
52
|
+
seal_err_t seal_stream(seal_stream_t*, seal_raw_t*, size_t* /*psize*/);
|
53
|
+
|
54
|
+
/*
|
55
|
+
* Rewinds a stream to the beginning.
|
56
|
+
*
|
57
|
+
* @param stream the stream to rewind
|
58
|
+
*/
|
59
|
+
seal_err_t seal_rewind_stream(seal_stream_t*);
|
60
|
+
|
61
|
+
/*
|
62
|
+
* Closes a stream opened by `seal_open_stream'.
|
63
|
+
*
|
64
|
+
* @param stream the stream to close; will be left untouched if an error
|
65
|
+
* occurs
|
66
|
+
*/
|
67
|
+
seal_err_t seal_close_stream(seal_stream_t*);
|
68
|
+
|
69
|
+
#ifdef __cplusplus
|
70
|
+
}
|
71
|
+
#endif
|
72
|
+
|
73
|
+
struct seal_stream_t
|
74
|
+
{
|
75
|
+
/* Tagged union of identifiers used by different decoder libraries. */
|
76
|
+
void* id;
|
77
|
+
seal_fmt_t fmt;
|
78
|
+
seal_raw_attr_t attr;
|
79
|
+
};
|
80
|
+
|
81
|
+
#endif /* _SEAL_STREAM_H_ */
|