├── .eslintignore ├── .eslintrc ├── .gitignore ├── .prettierrc ├── LICENSE.md ├── README.md ├── binding.gyp ├── deps ├── libogg │ ├── AUTHORS │ ├── CHANGES │ ├── COPYING │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── aclocal.m4 │ ├── compile │ ├── config.guess │ ├── config.h.in │ ├── config.sub │ ├── config │ │ ├── README │ │ ├── linux │ │ │ ├── arm │ │ │ │ └── ogg │ │ │ │ │ ├── config.h │ │ │ │ │ └── config_types.h │ │ │ ├── ia32 │ │ │ │ └── ogg │ │ │ │ │ ├── config.h │ │ │ │ │ └── config_types.h │ │ │ └── x64 │ │ │ │ └── ogg │ │ │ │ ├── config.h │ │ │ │ └── config_types.h │ │ └── mac │ │ │ ├── ia32 │ │ │ └── ogg │ │ │ │ ├── config.h │ │ │ │ └── config_types.h │ │ │ └── x64 │ │ │ └── ogg │ │ │ ├── config.h │ │ │ └── config_types.h │ ├── configure │ ├── configure.in │ ├── depcomp │ ├── doc │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── framing.html │ │ ├── index.html │ │ ├── libogg │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── bitpacking.html │ │ │ ├── datastructures.html │ │ │ ├── decoding.html │ │ │ ├── encoding.html │ │ │ ├── general.html │ │ │ ├── index.html │ │ │ ├── ogg_packet.html │ │ │ ├── ogg_packet_clear.html │ │ │ ├── ogg_page.html │ │ │ ├── ogg_page_bos.html │ │ │ ├── ogg_page_checksum_set.html │ │ │ ├── ogg_page_continued.html │ │ │ ├── ogg_page_eos.html │ │ │ ├── ogg_page_granulepos.html │ │ │ ├── ogg_page_packets.html │ │ │ ├── ogg_page_pageno.html │ │ │ ├── ogg_page_serialno.html │ │ │ ├── ogg_page_version.html │ │ │ ├── ogg_stream_clear.html │ │ │ ├── ogg_stream_destroy.html │ │ │ ├── ogg_stream_eos.html │ │ │ ├── ogg_stream_flush.html │ │ │ ├── ogg_stream_init.html │ │ │ ├── ogg_stream_packetin.html │ │ │ ├── ogg_stream_packetout.html │ │ │ ├── ogg_stream_packetpeek.html │ │ │ ├── ogg_stream_pagein.html │ │ │ ├── ogg_stream_pageout.html │ │ │ ├── ogg_stream_pageout_fill.html │ │ │ ├── ogg_stream_reset.html │ │ │ ├── ogg_stream_reset_serialno.html │ │ │ ├── ogg_stream_state.html │ │ │ ├── ogg_sync_buffer.html │ │ │ ├── ogg_sync_clear.html │ │ │ ├── ogg_sync_destroy.html │ │ │ ├── ogg_sync_init.html │ │ │ ├── ogg_sync_pageout.html │ │ │ ├── ogg_sync_pageseek.html │ │ │ ├── ogg_sync_reset.html │ │ │ ├── ogg_sync_state.html │ │ │ ├── ogg_sync_wrote.html │ │ │ ├── oggpack_adv.html │ │ │ ├── oggpack_adv1.html │ │ │ ├── oggpack_bits.html │ │ │ ├── oggpack_buffer.html │ │ │ ├── oggpack_bytes.html │ │ │ ├── oggpack_get_buffer.html │ │ │ ├── oggpack_look.html │ │ │ ├── oggpack_look1.html │ │ │ ├── oggpack_read.html │ │ │ ├── oggpack_read1.html │ │ │ ├── oggpack_readinit.html │ │ │ ├── oggpack_reset.html │ │ │ ├── oggpack_write.html │ │ │ ├── oggpack_writealign.html │ │ │ ├── oggpack_writeclear.html │ │ │ ├── oggpack_writecopy.html │ │ │ ├── oggpack_writeinit.html │ │ │ ├── oggpack_writetrunc.html │ │ │ ├── overview.html │ │ │ ├── reference.html │ │ │ └── style.css │ │ ├── ogg-multiplex.html │ │ ├── oggstream.html │ │ ├── rfc3533.txt │ │ ├── rfc5334.txt │ │ ├── skeleton.html │ │ ├── stream.png │ │ ├── vorbisword2.png │ │ ├── white-ogg.png │ │ └── white-xifish.png │ ├── include │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ └── ogg │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── config_types.h.in │ │ │ ├── ogg.h │ │ │ └── os_types.h │ ├── install-sh │ ├── libogg.gyp │ ├── libogg.spec │ ├── libogg.spec.in │ ├── ltmain.sh │ ├── macosx │ │ ├── English.lproj │ │ │ └── InfoPlist.strings │ │ ├── Info.plist │ │ ├── Ogg.xcodeproj │ │ │ └── project.pbxproj │ │ └── Ogg_Prefix.pch │ ├── missing │ ├── ogg-uninstalled.pc.in │ ├── ogg.m4 │ ├── ogg.pc.in │ ├── src │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── bitwise.c │ │ └── framing.c │ ├── test.c │ └── win32 │ │ ├── VS2003 │ │ ├── libogg │ │ │ └── libogg.vcproj │ │ └── ogg.sln │ │ ├── VS2005 │ │ ├── libogg_dynamic.sln │ │ ├── libogg_dynamic.vcproj │ │ ├── libogg_static.sln │ │ └── libogg_static.vcproj │ │ ├── VS2008 │ │ ├── libogg_dynamic.sln │ │ ├── libogg_dynamic.vcproj │ │ ├── libogg_static.sln │ │ └── libogg_static.vcproj │ │ ├── VS2010 │ │ ├── .vs │ │ │ └── libogg_dynamic │ │ │ │ └── v15 │ │ │ │ ├── .suo │ │ │ │ ├── Browse.VC.db │ │ │ │ └── ipch │ │ │ │ └── AutoPCH │ │ │ │ ├── 1ba763800dc74d2b │ │ │ │ └── FRAMING.ipch │ │ │ │ └── 3766b4fc1dfa998c │ │ │ │ └── BITWISE.ipch │ │ ├── libogg_dynamic.sln │ │ ├── libogg_dynamic.vcxproj │ │ ├── libogg_static.sln │ │ └── libogg_static.vcxproj │ │ ├── VS6 │ │ ├── build_ogg_dynamic.bat │ │ ├── build_ogg_dynamic_debug.bat │ │ ├── build_ogg_static.bat │ │ ├── build_ogg_static_debug.bat │ │ ├── ogg.dsw │ │ ├── ogg_dynamic.dsp │ │ └── ogg_static.dsp │ │ └── ogg.def └── libopus │ ├── AUTHORS │ ├── CMakeLists.txt │ ├── COPYING │ ├── ChangeLog │ ├── INSTALL │ ├── Makefile.am │ ├── Makefile.in │ ├── Makefile.mips │ ├── Makefile.unix │ ├── NEWS │ ├── OpusConfig.cmake.in │ ├── README │ ├── aclocal.m4 │ ├── celt │ ├── _kiss_fft_guts.h │ ├── arch.h │ ├── arm │ │ ├── arm2gnu.pl │ │ ├── arm_celt_map.c │ │ ├── armcpu.c │ │ ├── armcpu.h │ │ ├── armopts.s.in │ │ ├── celt_fft_ne10.c │ │ ├── celt_mdct_ne10.c │ │ ├── celt_neon_intr.c │ │ ├── celt_pitch_xcorr_arm-gnu.S │ │ ├── celt_pitch_xcorr_arm.s │ │ ├── fft_arm.h │ │ ├── fixed_arm64.h │ │ ├── fixed_armv4.h │ │ ├── fixed_armv5e.h │ │ ├── kiss_fft_armv4.h │ │ ├── kiss_fft_armv5e.h │ │ ├── mdct_arm.h │ │ ├── pitch_arm.h │ │ └── pitch_neon_intr.c │ ├── bands.c │ ├── bands.h │ ├── celt.c │ ├── celt.h │ ├── celt_decoder.c │ ├── celt_encoder.c │ ├── celt_lpc.c │ ├── celt_lpc.h │ ├── cpu_support.h │ ├── cwrs.c │ ├── cwrs.h │ ├── ecintrin.h │ ├── entcode.c │ ├── entcode.h │ ├── entdec.c │ ├── entdec.h │ ├── entenc.c │ ├── entenc.h │ ├── fixed_debug.h │ ├── fixed_generic.h │ ├── float_cast.h │ ├── kiss_fft.c │ ├── kiss_fft.h │ ├── laplace.c │ ├── laplace.h │ ├── mathops.c │ ├── mathops.h │ ├── mdct.c │ ├── mdct.h │ ├── mfrngcod.h │ ├── mips │ │ ├── celt_mipsr1.h │ │ ├── fixed_generic_mipsr1.h │ │ ├── kiss_fft_mipsr1.h │ │ ├── mdct_mipsr1.h │ │ ├── pitch_mipsr1.h │ │ └── vq_mipsr1.h │ ├── modes.c │ ├── modes.h │ ├── opus_custom_demo.c │ ├── os_support.h │ ├── pitch.c │ ├── pitch.h │ ├── quant_bands.c │ ├── quant_bands.h │ ├── rate.c │ ├── rate.h │ ├── stack_alloc.h │ ├── static_modes_fixed.h │ ├── static_modes_fixed_arm_ne10.h │ ├── static_modes_float.h │ ├── static_modes_float_arm_ne10.h │ ├── tests │ │ ├── test_unit_cwrs32.c │ │ ├── test_unit_dft.c │ │ ├── test_unit_entropy.c │ │ ├── test_unit_laplace.c │ │ ├── test_unit_mathops.c │ │ ├── test_unit_mdct.c │ │ ├── test_unit_rotation.c │ │ └── test_unit_types.c │ ├── vq.c │ ├── vq.h │ └── x86 │ │ ├── celt_lpc_sse.h │ │ ├── celt_lpc_sse4_1.c │ │ ├── pitch_sse.c │ │ ├── pitch_sse.h │ │ ├── pitch_sse2.c │ │ ├── pitch_sse4_1.c │ │ ├── vq_sse.h │ │ ├── vq_sse2.c │ │ ├── x86_celt_map.c │ │ ├── x86cpu.c │ │ └── x86cpu.h │ ├── celt_headers.mk │ ├── celt_sources.mk │ ├── compile │ ├── config.guess │ ├── config.h.cmake.in │ ├── config.h.in │ ├── config.sub │ ├── config │ └── opus │ │ ├── android │ │ └── arm │ │ │ └── config.h │ │ ├── freebsd │ │ └── x64 │ │ │ └── config.h │ │ ├── linux │ │ ├── arm │ │ │ └── config.h │ │ ├── arm64 │ │ │ └── config.h │ │ ├── ia32 │ │ │ └── config.h │ │ └── x64 │ │ │ └── config.h │ │ ├── mac │ │ └── x64 │ │ │ └── config.h │ │ └── win │ │ └── x64 │ │ └── config.h │ ├── configure │ ├── configure.ac │ ├── depcomp │ ├── doc │ ├── Doxyfile.in │ ├── Makefile.am │ ├── Makefile.in │ ├── TODO │ ├── customdoxygen.css │ ├── footer.html │ ├── header.html │ ├── opus_logo.svg │ └── trivial_example.c │ ├── include │ ├── opus.h │ ├── opus_custom.h │ ├── opus_defines.h │ ├── opus_multistream.h │ ├── opus_projection.h │ └── opus_types.h │ ├── install-sh │ ├── libopus.gyp │ ├── ltmain.sh │ ├── m4 │ ├── as-gcc-inline-assembly.m4 │ ├── ax_add_fortify_source.m4 │ ├── libtool.m4 │ ├── ltoptions.m4 │ ├── ltsugar.m4 │ ├── ltversion.m4 │ ├── lt~obsolete.m4 │ └── opus-intrinsics.m4 │ ├── missing │ ├── opus-uninstalled.pc.in │ ├── opus.m4 │ ├── opus.pc.in │ ├── opus_config.cmake │ ├── opus_functions.cmake │ ├── opus_headers.mk │ ├── opus_sources.cmake │ ├── opus_sources.mk │ ├── package_version │ ├── silk │ ├── A2NLSF.c │ ├── API.h │ ├── CNG.c │ ├── HP_variable_cutoff.c │ ├── Inlines.h │ ├── LPC_analysis_filter.c │ ├── LPC_fit.c │ ├── LPC_inv_pred_gain.c │ ├── LP_variable_cutoff.c │ ├── MacroCount.h │ ├── MacroDebug.h │ ├── NLSF2A.c │ ├── NLSF_VQ.c │ ├── NLSF_VQ_weights_laroia.c │ ├── NLSF_decode.c │ ├── NLSF_del_dec_quant.c │ ├── NLSF_encode.c │ ├── NLSF_stabilize.c │ ├── NLSF_unpack.c │ ├── NSQ.c │ ├── NSQ.h │ ├── NSQ_del_dec.c │ ├── PLC.c │ ├── PLC.h │ ├── SigProc_FIX.h │ ├── VAD.c │ ├── VQ_WMat_EC.c │ ├── ana_filt_bank_1.c │ ├── arm │ │ ├── LPC_inv_pred_gain_arm.h │ │ ├── LPC_inv_pred_gain_neon_intr.c │ │ ├── NSQ_del_dec_arm.h │ │ ├── NSQ_del_dec_neon_intr.c │ │ ├── NSQ_neon.c │ │ ├── NSQ_neon.h │ │ ├── SigProc_FIX_armv4.h │ │ ├── SigProc_FIX_armv5e.h │ │ ├── arm_silk_map.c │ │ ├── biquad_alt_arm.h │ │ ├── biquad_alt_neon_intr.c │ │ ├── macros_arm64.h │ │ ├── macros_armv4.h │ │ └── macros_armv5e.h │ ├── biquad_alt.c │ ├── bwexpander.c │ ├── bwexpander_32.c │ ├── check_control_input.c │ ├── code_signs.c │ ├── control.h │ ├── control_SNR.c │ ├── control_audio_bandwidth.c │ ├── control_codec.c │ ├── debug.c │ ├── debug.h │ ├── dec_API.c │ ├── decode_core.c │ ├── decode_frame.c │ ├── decode_indices.c │ ├── decode_parameters.c │ ├── decode_pitch.c │ ├── decode_pulses.c │ ├── decoder_set_fs.c │ ├── define.h │ ├── enc_API.c │ ├── encode_indices.c │ ├── encode_pulses.c │ ├── errors.h │ ├── fixed │ │ ├── LTP_analysis_filter_FIX.c │ │ ├── LTP_scale_ctrl_FIX.c │ │ ├── apply_sine_window_FIX.c │ │ ├── arm │ │ │ ├── warped_autocorrelation_FIX_arm.h │ │ │ └── warped_autocorrelation_FIX_neon_intr.c │ │ ├── autocorr_FIX.c │ │ ├── burg_modified_FIX.c │ │ ├── corrMatrix_FIX.c │ │ ├── encode_frame_FIX.c │ │ ├── find_LPC_FIX.c │ │ ├── find_LTP_FIX.c │ │ ├── find_pitch_lags_FIX.c │ │ ├── find_pred_coefs_FIX.c │ │ ├── k2a_FIX.c │ │ ├── k2a_Q16_FIX.c │ │ ├── main_FIX.h │ │ ├── mips │ │ │ ├── noise_shape_analysis_FIX_mipsr1.h │ │ │ └── warped_autocorrelation_FIX_mipsr1.h │ │ ├── noise_shape_analysis_FIX.c │ │ ├── pitch_analysis_core_FIX.c │ │ ├── process_gains_FIX.c │ │ ├── regularize_correlations_FIX.c │ │ ├── residual_energy16_FIX.c │ │ ├── residual_energy_FIX.c │ │ ├── schur64_FIX.c │ │ ├── schur_FIX.c │ │ ├── structs_FIX.h │ │ ├── vector_ops_FIX.c │ │ ├── warped_autocorrelation_FIX.c │ │ └── x86 │ │ │ ├── burg_modified_FIX_sse4_1.c │ │ │ └── vector_ops_FIX_sse4_1.c │ ├── float │ │ ├── LPC_analysis_filter_FLP.c │ │ ├── LPC_inv_pred_gain_FLP.c │ │ ├── LTP_analysis_filter_FLP.c │ │ ├── LTP_scale_ctrl_FLP.c │ │ ├── SigProc_FLP.h │ │ ├── apply_sine_window_FLP.c │ │ ├── autocorrelation_FLP.c │ │ ├── burg_modified_FLP.c │ │ ├── bwexpander_FLP.c │ │ ├── corrMatrix_FLP.c │ │ ├── encode_frame_FLP.c │ │ ├── energy_FLP.c │ │ ├── find_LPC_FLP.c │ │ ├── find_LTP_FLP.c │ │ ├── find_pitch_lags_FLP.c │ │ ├── find_pred_coefs_FLP.c │ │ ├── inner_product_FLP.c │ │ ├── k2a_FLP.c │ │ ├── main_FLP.h │ │ ├── noise_shape_analysis_FLP.c │ │ ├── pitch_analysis_core_FLP.c │ │ ├── process_gains_FLP.c │ │ ├── regularize_correlations_FLP.c │ │ ├── residual_energy_FLP.c │ │ ├── scale_copy_vector_FLP.c │ │ ├── scale_vector_FLP.c │ │ ├── schur_FLP.c │ │ ├── sort_FLP.c │ │ ├── structs_FLP.h │ │ ├── warped_autocorrelation_FLP.c │ │ └── wrappers_FLP.c │ ├── gain_quant.c │ ├── init_decoder.c │ ├── init_encoder.c │ ├── inner_prod_aligned.c │ ├── interpolate.c │ ├── lin2log.c │ ├── log2lin.c │ ├── macros.h │ ├── main.h │ ├── mips │ │ ├── NSQ_del_dec_mipsr1.h │ │ ├── macros_mipsr1.h │ │ └── sigproc_fix_mipsr1.h │ ├── pitch_est_defines.h │ ├── pitch_est_tables.c │ ├── process_NLSFs.c │ ├── quant_LTP_gains.c │ ├── resampler.c │ ├── resampler_down2.c │ ├── resampler_down2_3.c │ ├── resampler_private.h │ ├── resampler_private_AR2.c │ ├── resampler_private_IIR_FIR.c │ ├── resampler_private_down_FIR.c │ ├── resampler_private_up2_HQ.c │ ├── resampler_rom.c │ ├── resampler_rom.h │ ├── resampler_structs.h │ ├── shell_coder.c │ ├── sigm_Q15.c │ ├── sort.c │ ├── stereo_LR_to_MS.c │ ├── stereo_MS_to_LR.c │ ├── stereo_decode_pred.c │ ├── stereo_encode_pred.c │ ├── stereo_find_predictor.c │ ├── stereo_quant_pred.c │ ├── structs.h │ ├── sum_sqr_shift.c │ ├── table_LSF_cos.c │ ├── tables.h │ ├── tables_LTP.c │ ├── tables_NLSF_CB_NB_MB.c │ ├── tables_NLSF_CB_WB.c │ ├── tables_gain.c │ ├── tables_other.c │ ├── tables_pitch_lag.c │ ├── tables_pulses_per_block.c │ ├── tests │ │ └── test_unit_LPC_inv_pred_gain.c │ ├── tuning_parameters.h │ ├── typedef.h │ └── x86 │ │ ├── NSQ_del_dec_sse4_1.c │ │ ├── NSQ_sse4_1.c │ │ ├── SigProc_FIX_sse.h │ │ ├── VAD_sse4_1.c │ │ ├── VQ_WMat_EC_sse4_1.c │ │ ├── main_sse.h │ │ └── x86_silk_map.c │ ├── silk_headers.mk │ ├── silk_sources.mk │ ├── src │ ├── analysis.c │ ├── analysis.h │ ├── mapping_matrix.c │ ├── mapping_matrix.h │ ├── mlp.c │ ├── mlp.h │ ├── mlp_data.c │ ├── opus.c │ ├── opus_compare.c │ ├── opus_decoder.c │ ├── opus_demo.c │ ├── opus_encoder.c │ ├── opus_multistream.c │ ├── opus_multistream_decoder.c │ ├── opus_multistream_encoder.c │ ├── opus_private.h │ ├── opus_projection_decoder.c │ ├── opus_projection_encoder.c │ ├── repacketizer.c │ ├── repacketizer_demo.c │ └── tansig_table.h │ ├── test-driver │ ├── tests │ ├── opus_encode_regressions.c │ ├── run_vectors.sh │ ├── test_opus_api.c │ ├── test_opus_common.h │ ├── test_opus_decode.c │ ├── test_opus_encode.c │ ├── test_opus_padding.c │ └── test_opus_projection.c │ └── win32 │ ├── VS2015 │ ├── common.props │ ├── opus.sln │ ├── opus.vcxproj │ ├── opus.vcxproj.filters │ ├── opus_demo.vcxproj │ ├── opus_demo.vcxproj.filters │ ├── test_opus_api.vcxproj │ ├── test_opus_api.vcxproj.filters │ ├── test_opus_decode.vcxproj │ ├── test_opus_decode.vcxproj.filters │ ├── test_opus_encode.vcxproj │ └── test_opus_encode.vcxproj.filters │ ├── config.h │ └── genversion.bat ├── dist ├── OggOpusToRtp.d.ts ├── OggOpusToRtp.js ├── RtpDecoder.d.ts ├── RtpDecoder.js ├── RtpEncoder.d.ts ├── RtpEncoder.js ├── RtpOpusToPcm.d.ts ├── RtpOpusToPcm.js ├── RtpToOggOpus.d.ts ├── RtpToOggOpus.js ├── index.d.ts └── index.js ├── jestconfig.json ├── lib ├── OggOpusToRtp.ts ├── RtpDecoder.ts ├── RtpEncoder.ts ├── RtpOpusToPcm.ts ├── RtpToOggOpus.ts ├── binding │ └── napi-v3 │ │ ├── oggopus.exp │ │ ├── oggopus.ilk │ │ ├── oggopus.lib │ │ └── oggopus.node └── index.ts ├── package.json ├── src ├── helpers.cc ├── helpers.h ├── main.cc ├── ogg_opus_to_rtp.cc ├── ogg_opus_to_rtp.h ├── rtp_decoder.cc ├── rtp_decoder.h ├── rtp_encoder.cc ├── rtp_encoder.h ├── rtp_opus_to_pcm.cc ├── rtp_opus_to_pcm.h ├── rtp_to_ogg_opus.cc └── rtp_to_ogg_opus.h ├── tests ├── RtpDecoder.test.ts ├── RtpEncoder.test.ts └── utils │ ├── greetings.opus │ ├── random.ts │ ├── rtppacket.dat │ ├── rtppayload.raw │ ├── sample1.opus │ ├── sample2.opus │ ├── sample3.opus │ └── small.opus ├── tsconfig.json └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "@typescript-eslint/parser", 4 | "plugins": ["@typescript-eslint"], 5 | "extends": [ 6 | "eslint:recommended", 7 | "plugin:@typescript-eslint/eslint-recommended", 8 | "plugin:@typescript-eslint/recommended" 9 | ], 10 | "rules": { 11 | "@typescript-eslint/no-explicit-any": "off", 12 | "@typescript-eslint/explicit-module-boundary-types": "off" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Packages 2 | node_modules/ 3 | 4 | # Log files 5 | logs/ 6 | *.log 7 | npm-debug.log* 8 | 9 | # Runtime data 10 | pids 11 | *.pid 12 | *.seed 13 | 14 | # Media files 15 | lib/captures 16 | lib/music 17 | 18 | # Miscellaneous 19 | .vscode/ 20 | .tmp/ 21 | build/ 22 | build-tmp*/ 23 | include/ 24 | !deps/libogg/include 25 | !deps/libopus/include 26 | prebuild/ 27 | 28 | addon-build/ 29 | compiled/ 30 | coverage/ 31 | dist/ -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/prettierrc", 3 | "arrowParens": "avoid", 4 | "singleQuote": true, 5 | "trailingComma": "all", 6 | "tabWidth": 4, 7 | "printWidth": 120 8 | } 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rtp-ogg-opus 2 | 3 | RTP Ogg/Opus Tools for NodeJS 4 | 5 | ## Introduction 6 | 7 | This module contains five useful transform streams to work with RTP and Ogg/Opus. This classes are based on native bindings to 8 | libopus 1.3.1 and libogg 1.3.4. The core of this library is based on [opus-tools 0.2](https://opus-codec.org/release/dev/2018/09/18/opus-tools-0_2.html). 9 | 10 | - OggOpusToRtp: used to read ogg/opus files or streams and send them through RTP. 11 | - RtpDecoder: used to decode RTP packets into streams (payload). 12 | - RtpEncoder: used to encode streams into RTP packets. 13 | - RtpOpusToPcm: used to read RTP Opus encoded packets and convert them to Linear PCM. 14 | - RtpToOggOpus: used to read RTP Opus encoded packets and encapsulate them in Ogg containers. 15 | 16 | ## Installation 17 | 18 | ```sh 19 | npm install rtp-ogg-opus 20 | ``` 21 | 22 | ## Usage 23 | 24 | Check out our [examples project](https://github.com/libersys/rtp-ogg-opus-examples). 25 | -------------------------------------------------------------------------------- /deps/libogg/AUTHORS: -------------------------------------------------------------------------------- 1 | Monty 2 | Greg Maxwell 3 | Ralph Giles 4 | Cristian Adam 5 | Tim Terriberry 6 | 7 | and the rest of the Xiph.Org Foundation. 8 | -------------------------------------------------------------------------------- /deps/libogg/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002, Xiph.org Foundation 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | - Neither the name of the Xiph.org Foundation nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 22 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /deps/libogg/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | 4 | #AUTOMAKE_OPTIONS = foreign 1.6 dist-zip 5 | AUTOMAKE_OPTIONS = foreign 1.11 dist-zip dist-xz 6 | 7 | SUBDIRS = src include doc 8 | 9 | m4datadir = $(datadir)/aclocal 10 | m4data_DATA = ogg.m4 11 | 12 | pkgconfigdir = $(libdir)/pkgconfig 13 | pkgconfig_DATA = ogg.pc 14 | 15 | EXTRA_DIST = README AUTHORS CHANGES COPYING \ 16 | libogg.spec libogg.spec.in \ 17 | ogg.m4 ogg.pc.in ogg-uninstalled.pc.in \ 18 | macosx win32 19 | 20 | dist-hook: 21 | for item in $(EXTRA_DIST); do \ 22 | if test -d $$item; then \ 23 | echo -n "cleaning dir $$item for distribution..."; \ 24 | rm -rf `find $(distdir)/$$item -name .svn`; \ 25 | echo "OK"; \ 26 | fi; \ 27 | done 28 | debug: 29 | $(MAKE) all CFLAGS="@DEBUG@" 30 | 31 | profile: 32 | $(MAKE) all CFLAGS="@PROFILE@" 33 | -------------------------------------------------------------------------------- /deps/libogg/config/README: -------------------------------------------------------------------------------- 1 | 2 | configure with: 3 | 4 | ./configure --enable-static --disable-shared --with-pic 5 | -------------------------------------------------------------------------------- /deps/libogg/config/linux/arm/ogg/config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure */ 5 | #define INCLUDE_INTTYPES_H 1 6 | #define INCLUDE_STDINT_H 1 7 | #define INCLUDE_SYS_TYPES_H 1 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef short ogg_int16_t; 20 | typedef unsigned short ogg_uint16_t; 21 | typedef int ogg_int32_t; 22 | typedef unsigned int ogg_uint32_t; 23 | typedef long long ogg_int64_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /deps/libogg/config/linux/ia32/ogg/config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure */ 5 | #define INCLUDE_INTTYPES_H 1 6 | #define INCLUDE_STDINT_H 1 7 | #define INCLUDE_SYS_TYPES_H 1 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef short ogg_int16_t; 20 | typedef unsigned short ogg_uint16_t; 21 | typedef int ogg_int32_t; 22 | typedef unsigned int ogg_uint32_t; 23 | typedef long long ogg_int64_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /deps/libogg/config/linux/x64/ogg/config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure */ 5 | #define INCLUDE_INTTYPES_H 1 6 | #define INCLUDE_STDINT_H 1 7 | #define INCLUDE_SYS_TYPES_H 1 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef short ogg_int16_t; 20 | typedef unsigned short ogg_uint16_t; 21 | typedef int ogg_int32_t; 22 | typedef unsigned int ogg_uint32_t; 23 | typedef long ogg_int64_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /deps/libogg/config/mac/ia32/ogg/config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure */ 5 | #define INCLUDE_INTTYPES_H 1 6 | #define INCLUDE_STDINT_H 1 7 | #define INCLUDE_SYS_TYPES_H 1 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef short ogg_int16_t; 20 | typedef unsigned short ogg_uint16_t; 21 | typedef int ogg_int32_t; 22 | typedef unsigned int ogg_uint32_t; 23 | typedef long long ogg_int64_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /deps/libogg/config/mac/x64/ogg/config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure */ 5 | #define INCLUDE_INTTYPES_H 1 6 | #define INCLUDE_STDINT_H 1 7 | #define INCLUDE_SYS_TYPES_H 1 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef short ogg_int16_t; 20 | typedef unsigned short ogg_uint16_t; 21 | typedef int ogg_int32_t; 22 | typedef unsigned int ogg_uint32_t; 23 | typedef long ogg_int64_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /deps/libogg/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this with automake to create Makefile.in 2 | 3 | SUBDIRS = libogg 4 | 5 | docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) 6 | 7 | doc_DATA = framing.html index.html oggstream.html ogg-multiplex.html \ 8 | stream.png vorbisword2.png white-ogg.png white-xifish.png \ 9 | rfc3533.txt rfc5334.txt skeleton.html 10 | 11 | EXTRA_DIST = $(doc_DATA) 12 | -------------------------------------------------------------------------------- /deps/libogg/doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ogg Documentation 7 | 8 | 64 | 65 | 66 | 67 | 68 | 69 | 72 | 73 |

Ogg Documentation

74 | 75 |

Ogg programming documentation

76 | 77 | 80 | 81 |

Ogg bitsream documentation

82 | 83 | 89 | 90 |

RFC documentation

91 | 92 | 96 | 97 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/ogg 4 | 5 | doc_DATA = bitpacking.html datastructures.html decoding.html encoding.html\ 6 | general.html index.html ogg_packet.html ogg_packet_clear.html\ 7 | ogg_page.html ogg_page_bos.html ogg_page_checksum_set.html\ 8 | ogg_page_continued.html ogg_page_eos.html ogg_page_granulepos.html\ 9 | ogg_page_packets.html ogg_page_pageno.html ogg_page_serialno.html\ 10 | ogg_page_version.html ogg_stream_clear.html ogg_stream_destroy.html\ 11 | ogg_stream_eos.html ogg_stream_flush.html ogg_stream_init.html\ 12 | ogg_stream_packetin.html ogg_stream_packetout.html\ 13 | ogg_stream_packetpeek.html ogg_stream_pagein.html\ 14 | ogg_stream_pageout.html ogg_stream_pageout_fill.html ogg_stream_reset.html\ 15 | ogg_stream_reset_serialno.html ogg_stream_state.html\ 16 | ogg_sync_buffer.html ogg_sync_clear.html ogg_sync_destroy.html\ 17 | ogg_sync_init.html ogg_sync_pageout.html ogg_sync_pageseek.html\ 18 | ogg_sync_reset.html ogg_sync_state.html ogg_sync_wrote.html\ 19 | oggpack_adv.html oggpack_adv1.html oggpack_bits.html\ 20 | oggpack_buffer.html oggpack_bytes.html oggpack_get_buffer.html\ 21 | oggpack_look.html oggpack_look1.html oggpack_read.html\ 22 | oggpack_read1.html oggpack_readinit.html oggpack_reset.html\ 23 | oggpack_write.html oggpack_writealign.html oggpack_writeclear.html\ 24 | oggpack_writecopy.html oggpack_writeinit.html oggpack_writetrunc.html\ 25 | overview.html reference.html style.css 26 | 27 | EXTRA_DIST = $(doc_DATA) 28 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/datastructures.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - Base Data Structures 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

libogg documentation

libogg release 1.3.0 - 20110804

15 | 16 |

Base Data Structures

17 |

Libogg uses several data structures to hold data and state information. 18 |

19 | All the libogg specific data structures are declared in "ogg/ogg.h". 20 |

21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
datatypepurpose
ogg_pageThis structure encapsulates data into one ogg bitstream page.
ogg_stream_stateThis structure contains current encode/decode data for a logical bitstream.
ogg_packetThis structure encapsulates the data and metadata for a single Ogg packet.
ogg_sync_stateContains bitstream synchronization information.
44 | 45 |

46 |


47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |

copyright © 2000-2011 Xiph.Org

Ogg Container Format

libogg documentation

libogg release 1.3.0 - 20110804

56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - Documentation 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

libogg documentation

libogg release 1.3.0 - 20110804

15 | 16 |

Libogg Documentation

17 | 18 |

19 | Libogg contains necessary functionality to create, decode, and work with Ogg bitstreams. 20 |

This document explains how to use the libogg API in detail. 21 |

22 | libogg api overview
23 | libogg api reference
24 | 25 |

26 |


27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |

copyright © 2000-2011 Xiph.Org

Ogg Container Format

libogg documentation

libogg release 1.3.0 - 20110804

36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_packet_clear.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_packet_clear 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

libogg documentation

libogg release 1.3.0 - 20110804

15 | 16 |

ogg_packet_clear

17 | 18 |

declared in "ogg/ogg.h";

19 | 20 |

This function clears the memory used by the ogg_packet struct, 21 | but does not free the structure itself. 22 | It unconditionally frees the packet data buffer, 23 | then it zeros all structure members. 24 |

25 | 26 | 27 | 32 | 33 |
28 |

29 | void ogg_packet_clear(ogg_packet *op);
30 | 
31 |
34 | 35 |

Parameters

36 |
37 |
op
38 |
Pointer to the ogg_packet struct to be cleared.
39 |
40 | 41 | 42 |

Return Values

43 |
44 |
  • 45 | None.
  • 46 |
    47 |

    48 | 49 |

    50 |


    51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_page_bos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_page_bos 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_page_bos

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    Indicates whether this page is at the beginning of the logical bitstream. 21 |

    22 |

    23 | 24 | 25 | 31 | 32 |
    26 |
    
    27 | int ogg_page_bos(ogg_page *og);
    28 | 
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    og
    37 |
    Pointer to the current ogg_page struct.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • 44 | greater than 0 if this page is the beginning of a bitstream.
  • 45 |
  • 46 | 0 if this page is from any other location in the stream.
  • 47 |
    48 |

    49 | 50 |

    51 |


    52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_page_checksum_set.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_page_checksum_set 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_page_checksum_set

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    Checksums an ogg_page. 21 |

    22 |

    23 | 24 | 25 | 31 | 32 |
    26 |
    
    27 | int ogg_page_checksum_set(ogg_page *og);
    28 | 
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    og
    37 |
    Pointer to an ogg_page struct.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 | None. 44 |
    45 |

    46 | 47 |

    48 |


    49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_page_continued.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_page_version 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_page_continued

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    Indicates whether this page contains packet data which has been continued from the previous page. 21 |

    22 | 23 | 24 | 30 | 31 |
    25 |
    
    26 | int ogg_page_continued(ogg_page *og);
    27 | 
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    og
    36 |
    Pointer to the current ogg_page struct.
    37 |
    38 | 39 | 40 |

    Return Values

    41 |
    42 |
  • 43 | 1 if this page contains packet data continued from the last page.
  • 44 |
  • 45 | 0 if this page does not contain continued data.
  • 46 |
    47 |

    48 | 49 |

    50 |


    51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_page_eos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_page_eos 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_page_eos

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    Indicates whether this page is at the end of the logical bitstream. 21 |

    22 |

    23 | 24 | 25 | 31 | 32 |
    26 |
    
    27 | int ogg_page_eos(ogg_page *og);
    28 | 
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    og
    37 |
    Pointer to the current ogg_page struct.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • 44 | greater than zero if this page contains the end of a bitstream.
  • 45 |
  • 46 | 0 if this page is from any other location in the stream.
  • 47 |
    48 |

    49 | 50 |

    51 |


    52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_page_granulepos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_page_granulepos 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_page_granulepos

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    Returns the exact granular position of the packet data contained at the end of this page. 21 |

    This is useful for tracking location when seeking or decoding. 22 |

    For example, in audio codecs this position is the pcm sample number and in video this is the frame number. 23 |

    24 |

    25 | 26 | 27 | 33 | 34 |
    28 |
    
    29 | ogg_in64_t ogg_page_granulepos(ogg_page *og);
    30 | 
    31 | 
    32 |
    35 | 36 |

    Parameters

    37 |
    38 |
    og
    39 |
    Pointer to the current ogg_page struct.
    40 |
    41 | 42 | 43 |

    Return Values

    44 |
    45 |
  • 46 | n is the specific last granular position of the decoded data contained in the page.
  • 47 |
    48 |

    49 | 50 |

    51 |


    52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_page_packets.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_page_packets 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_page_packets

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    Returns the number of packets that are completed on this page. If the 21 | leading packet is begun on a previous page, but ends on this page, it's 22 | counted. 23 |

    24 |

    25 | 26 | 27 | 33 | 34 |
    28 |
    
    29 | int ogg_page_packets(ogg_page *og);
    30 | 
    31 | 
    32 |
    35 | 36 |

    Parameters

    37 |
    38 |
    og
    39 |
    Pointer to the current ogg_page struct.
    40 |
    41 | 42 | 43 |

    Return Values

    44 |
    45 | If a page consists of a packet begun on a previous page, and a new packet 46 | begun (but not completed) on this page, the return will be:
    47 |
    48 | ogg_page_packets(page) will return 1,
    49 | ogg_page_continued(paged) will return non-zero.
    50 |

    51 | If a page happens to be a single packet that was begun on a previous page, and 52 | spans to the next page (in the case of a three or more page packet), the 53 | return will be:
    54 |
    55 | ogg_page_packets(page) will return 0,
    56 | ogg_page_continued(page) will return non-zero.
    57 |
    58 |

    59 | 60 |

    61 |


    62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_page_pageno.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_page_pageno 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_page_pageno

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    Returns the sequential page number. 21 |

    This is useful for ordering pages or determining when pages have been lost. 22 |

    23 | 24 | 25 | 31 | 32 |
    26 |
    
    27 | long ogg_page_pageno(ogg_page *og);
    28 | 
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    og
    37 |
    Pointer to the current ogg_page struct.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • 44 | n is the page number for this page.
  • 45 |
    46 |

    47 | 48 |

    49 |


    50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_page_serialno.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_page_serialno 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_page_serialno

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    Returns the unique serial number for the logical bitstream of this page. Each page contains the serial number for the logical bitstream that it belongs to. 21 |

    22 |

    23 | 24 | 25 | 31 | 32 |
    26 |
    
    27 | int ogg_page_serialno(ogg_page *og);
    28 | 
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    og
    37 |
    Pointer to the current ogg_page struct.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • 44 | n is the serial number for this page.
  • 45 |
    46 |

    47 | 48 |

    49 |


    50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_page_version.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_page_version 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_page_version

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function returns the version of ogg_page used in this page. 21 |

    In current versions of libogg, all ogg_page structs have the same version, so 0 should always be returned. 22 |

    23 | 24 | 25 | 31 | 32 |
    26 |
    
    27 | int ogg_page_version(ogg_page *og);
    28 | 
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    og
    37 |
    Pointer to the current ogg_page struct.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • 44 | n is the version number. In the current version of Ogg, the version number is always 0. Nonzero return values indicate an error in page encoding.
  • 45 |
    46 |

    47 | 48 |

    49 |


    50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_stream_clear.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_stream_clear 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_stream_clear

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function clears and frees the internal memory used by the ogg_stream_state struct, but does not free the structure itself. It is safe to call ogg_stream_clear on the same structure more than once. 21 |

    22 | 23 | 24 | 29 | 30 |
    25 |
    
    26 | int ogg_stream_clear(ogg_stream_state *os);
    27 | 
    28 |
    31 | 32 |

    Parameters

    33 |
    34 |
    os
    35 |
    Pointer to the ogg_stream_state struct to be cleared.
    36 |
    37 | 38 | 39 |

    Return Values

    40 |
    41 |
  • 42 | 0 is always returned.
  • 43 |
    44 |

    45 | 46 |

    47 |


    48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_stream_destroy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_stream_destroy 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_stream_destroy

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function frees the internal memory used by 21 | the ogg_stream_state struct as 22 | well as the structure itself. 23 | 24 |

    This should be called when you are done working with an ogg stream. 25 | It can also be called to make sure that the struct does not exist.

    26 | 27 |

    It calls free() on its argument, so if the ogg_stream_state 28 | is not malloc()'d or will otherwise be freed by your own code, use 29 | ogg_stream_clear instead.

    30 | 31 |

    32 | 33 | 34 | 39 | 40 |
    35 |
    
    36 | int ogg_stream_destroy(ogg_stream_state *os);
    37 | 
    38 |
    41 | 42 |

    Parameters

    43 |
    44 |
    os
    45 |
    Pointer to the ogg_stream_state struct to be destroyed.
    46 |
    47 | 48 | 49 |

    Return Values

    50 |
    51 |
  • 52 | 0 is always returned.
  • 53 |
    54 |

    55 | 56 |

    57 |


    58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_stream_eos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_stream_eos 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_stream_eos

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function indicates whether we have reached the end of the stream or not. 21 |

    22 | 23 | 24 | 29 | 30 |
    25 |
    
    26 | int ogg_stream_eos(ogg_stream_state *os);
    27 | 
    28 |
    31 | 32 |

    Parameters

    33 |
    34 |
    os
    35 |
    Pointer to the current ogg_stream_state struct.
    36 |
    37 | 38 | 39 |

    Return Values

    40 |
    41 |
  • 1 if we are at the end of the stream or an internal error occurred.
  • 42 |
  • 43 | 0 if we have not yet reached the end of the stream.
  • 44 |
    45 |

    46 | 47 |

    48 |


    49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_stream_init.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_stream_init 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_stream_init

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function is used to initialize an ogg_stream_state struct and allocates appropriate memory in preparation for encoding or decoding. 21 |

    It also assigns the stream a given serial number. 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | int ogg_stream_init(ogg_stream_state *os,int serialno);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    os
    36 |
    Pointer to the ogg_stream_state struct that we will be initializing.
    37 |
    serialno
    38 |
    Serial number that we will attach to this stream.
    39 |
    40 | 41 | 42 |

    Return Values

    43 |
    44 |
  • 45 | 0 if successful
  • 46 |
  • 47 | -1 if unsuccessful.
  • 48 |
    49 |

    50 | 51 |

    52 |


    53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_stream_packetin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_stream_packetin 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_stream_packetin

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function submits a packet to the bitstream for page 21 | encapsulation. After this is called, more packets can be submitted, 22 | or pages can be written out.

    23 | 24 |

    In a typical encoding situation, this should be used after filling a 25 | packet with data. 26 | The data in the packet is copied into the internal storage managed by 27 | the ogg_stream_state, so the caller 28 | is free to alter the contents of op after this call has returned. 29 | 30 |

    31 | 32 | 33 | 38 | 39 |
    34 |
    
    35 | int ogg_stream_packetin(ogg_stream_state *os,ogg_packet *op);
    36 | 
    37 |
    40 | 41 |

    Parameters

    42 |
    43 |
    os
    44 |
    Pointer to a previously declared ogg_stream_state struct.
    45 |
    op
    46 |
    Pointer to the packet we are putting into the bitstream. 47 |
    48 | 49 | 50 |

    Return Values

    51 |
    52 |
  • 53 | 0 returned on success. -1 returned in the event of internal error.
  • 54 |
    55 |

    56 | 57 |

    58 |


    59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_stream_pagein.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_stream_pagein 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_stream_pagein

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function adds a complete page to the bitstream. 21 |

    In a typical decoding situation, this function would be called after using ogg_sync_pageout to create a valid ogg_page struct. 22 |

    Internally, this function breaks the page into packet segments in preparation for outputting a valid packet to the codec decoding layer. 23 | 24 |

    25 | 26 | 27 | 32 | 33 |
    28 |
    
    29 | int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);
    30 | 
    31 |
    34 | 35 |

    Parameters

    36 |
    37 |
    os
    38 |
    Pointer to a previously declared ogg_stream struct, which represents the current logical bitstream.
    39 |
    og
    40 |
    Pointer to a page of data. The data inside this page is being submitted to the streaming layer in order to be allocated into packets. 41 |
    42 | 43 | 44 |

    Return Values

    45 |
    46 |
  • -1 indicates failure. This means that the serial number of the page did not match the serial number of the bitstream, the page version was incorrect, or an internal error accurred.
  • 47 |
  • 48 | 0 means that the page was successfully submitted to the bitstream.
  • 49 |
    50 |

    51 | 52 |

    53 |


    54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_stream_reset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_stream_reset 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_stream_reset

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function sets values in the ogg_stream_state struct back to initial values. 21 |

    22 | 23 | 24 | 29 | 30 |
    25 |
    
    26 | int ogg_stream_reset(ogg_stream_state *os);
    27 | 
    28 |
    31 | 32 |

    Parameters

    33 |
    34 |
    os
    35 |
    Pointer to the ogg_stream_state struct to be cleared.
    36 |
    37 | 38 | 39 |

    Return Values

    40 |
    41 |
  • 42 | 0 indicates success. nonzero is returned on internal error.
  • 43 |
    44 |

    45 | 46 |

    47 |


    48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_stream_reset_serialno.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_stream_reset_serialno 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_stream_reset

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function reinitializes the values in the 21 | ogg_stream_state, 22 | just like ogg_stream_reset(). 23 | Additionally, it sets the stream serial number to the given value.

    24 | 25 |

    26 | 27 | 28 | 33 | 34 |
    29 |
    
    30 | int ogg_stream_reset_serialno(ogg_stream_state *os, int serialno);
    31 | 
    32 |
    35 | 36 |

    Parameters

    37 |
    38 |
    os
    39 |
    Pointer to the ogg_stream_state struct to be cleared.
    40 |
    serialno
    41 |
    New stream serial number to use
    42 |
    43 | 44 | 45 |

    Return Values

    46 |
    47 |
  • 48 | 0 indicates success. nonzero is returned on internal error.
  • 49 |
    50 |

    51 | 52 |

    53 |


    54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |

    copyright © 2000-2011 Xiph.Org Foundation

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_sync_buffer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_sync_buffer 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_sync_buffer

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function is used to provide a properly-sized buffer for writing. 21 |

    Buffer space which has already been returned is cleared, and the buffer is extended as necessary by the size plus some additional bytes. Within the current implementation, an extra 4096 bytes are allocated, but applications should not rely on this additional buffer space. 22 |

    The buffer exposed by this function is empty internal storage from the ogg_sync_state struct, beginning at the fill mark within the struct. 23 |

    A pointer to this buffer is returned to be used by the calling application. 24 | 25 |

    26 | 27 | 28 | 33 | 34 |
    29 |
    
    30 | char *ogg_sync_buffer(ogg_sync_state *oy, long size);
    31 | 
    32 |
    35 | 36 |

    Parameters

    37 |
    38 |
    oy
    39 |
    Pointer to a previously declared ogg_sync_state struct.
    40 |
    size
    41 |
    Size of the desired buffer. The actual size of the buffer returned will be this size plus some extra bytes (currently 4096). 42 |
    43 | 44 | 45 |

    Return Values

    46 |
    47 |
  • 48 | Returns a pointer to the newly allocated buffer or NULL on error
  • 49 |
    50 |

    51 | 52 |

    53 |


    54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_sync_clear.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_sync_clear 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_sync_clear

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function is used to free the internal storage of an ogg_sync_state struct and resets the struct to the initial state. To free the entire struct, ogg_sync_destroy should be used instead. In situations where the struct needs to be reset but the internal storage does not need to be freed, ogg_sync_reset should be used. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | int ogg_sync_clear(ogg_sync_state *oy);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    oy
    36 |
    Pointer to a previously declared ogg_sync_state struct.
    37 |
    38 | 39 | 40 |

    Return Values

    41 |
    42 |
  • 43 | 0 is always returned.
  • 44 |
    45 |

    46 | 47 |

    48 |


    49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_sync_destroy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_sync_destroy 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_sync_destroy

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function is used to destroy an ogg_sync_state struct and free all memory used.

    21 | 22 |

    Note this calls free() on its argument so you should only use this 23 | function if you've allocated the ogg_sync_state on the heap. If it is 24 | allocated on the stack, or it will otherwise be freed by your 25 | own code, use ogg_sync_clear instead 26 | to release just the internal memory.

    27 | 28 |

    29 | 30 | 31 | 36 | 37 |
    32 |
    
    33 | int ogg_sync_destroy(ogg_sync_state *oy);
    34 | 
    35 |
    38 | 39 |

    Parameters

    40 |
    41 |
    oy
    42 |
    Pointer to a previously declared ogg_sync_state struct.
    43 |
    44 | 45 | 46 |

    Return Values

    47 |
    48 |
  • 49 | 0 is always returned.
  • 50 |
    51 |

    52 | 53 |

    54 |


    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_sync_init.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_sync_init 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_sync_init

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function is used to initialize an ogg_sync_state struct to a known initial value in preparation for manipulation of an Ogg bitstream. 21 |

    The ogg_sync struct is important when decoding, as it synchronizes retrieval and return of data. 22 | 23 |

    24 | 25 | 26 | 31 | 32 |
    27 |
    
    28 | int ogg_sync_init(ogg_sync_state *oy);
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    oy
    37 |
    Pointer to a previously declared ogg_sync_state struct. After this function call, this struct has been initialized.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • 44 | 0 is always returned.
  • 45 |
    46 |

    47 | 48 |

    49 |


    50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_sync_pageseek.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_sync_pageseek 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_sync_pageseek

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function synchronizes the ogg_sync_state struct to the next ogg_page. 21 |

    This is useful when seeking within a bitstream. ogg_sync_pageseek will synchronize to the next page in the bitstream and return information about how many bytes we advanced or skipped in order to do so. 22 | 23 |

    24 | 25 | 26 | 31 | 32 |
    27 |
    
    28 | int ogg_sync_pageseek(ogg_sync_state *oy, ogg_page *og);
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    oy
    37 |
    Pointer to a previously declared ogg_sync_state struct.
    38 |
    og
    39 |
    Pointer to a page (or an incomplete page) of data. This is the page we are attempting to sync. 40 |
    41 | 42 | 43 |

    Return Values

    44 |
    45 |
  • -n means that we skipped n bytes within the bitstream.
  • 46 |
  • 47 | 0 means that the page isn't ready and we need more data, or than an internal error occurred. No bytes have been skipped.
  • 48 |
  • 49 | n means that the page was synced at the current location, with a page length of n bytes. 50 |
  • 51 |

    52 | 53 |

    54 |


    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_sync_reset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_sync_reset 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_sync_reset

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function is used to reset the internal counters of the ogg_sync_state struct to initial values. 21 |

    It is a good idea to call this before seeking within a bitstream. 22 | 23 |

    24 | 25 | 26 | 31 | 32 |
    27 |
    
    28 | int ogg_sync_reset(ogg_sync_state *oy);
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    oy
    37 |
    Pointer to a previously declared ogg_sync_state struct.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • 44 | 0 is always returned.
  • 45 |
    46 |

    47 | 48 |

    49 |


    50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/ogg_sync_wrote.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - ogg_sync_wrote 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    ogg_sync_wrote

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function is used to tell the ogg_sync_state struct how many bytes we wrote into the buffer. 21 | 22 |

    23 | The general proceedure is to request a pointer into an internal 24 | ogg_sync_state buffer by calling 25 | ogg_sync_buffer(). The buffer 26 | is then filled up to the requested size with new input, and 27 | ogg_sync_wrote() is called to advance the fill pointer by however 28 | much data was actually available.

    29 | 30 |
    31 | 32 | 33 | 38 | 39 |
    34 |
    
    35 | int ogg_sync_wrote(ogg_sync_state *oy, long bytes);
    36 | 
    37 |
    40 | 41 |

    Parameters

    42 |
    43 |
    oy
    44 |
    Pointer to a previously declared ogg_sync_state struct.
    45 |
    bytes
    46 |
    Number of bytes of new data written.
    47 |
    48 | 49 | 50 |

    Return Values

    51 |
    52 |
  • -1 if the number of bytes written overflows the internal storage of the ogg_sync_state struct or an internal error occurred. 53 |
  • 54 | 0 in all other cases.
  • 55 |
    56 | 57 | 58 |

    59 |
    60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_adv.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_adv 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_adv

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function advances the location pointer by the specified number of bits without reading any data. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | void  oggpack_adv(oggpack_buffer *b,int bits);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    b
    36 |
    Pointer to the current oggpack_buffer.
    37 |
    bits
    38 |
    Number of bits to advance.
    39 |
    40 | 41 | 42 |

    Return Values

    43 |
    44 |
  • 45 | No values are returned.
  • 46 |
    47 |

    48 | 49 |

    50 |


    51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |

    copyright © 2000-2011 Xiph.Org Foundation

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_adv1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_adv1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_adv1

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function advances the location pointer by one bit without reading any data. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | void  oggpack_adv1(oggpack_buffer *b);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    b
    36 |
    Pointer to the current oggpack_buffer.
    37 |
    38 | 39 | 40 |

    Return Values

    41 |
    42 |
  • No values are returned. 43 |
  • 44 |
    45 |

    46 | 47 |

    48 |


    49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_bits.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_bits 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_bits

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function returns the total number of bits currently in the oggpack_buffer's internal buffer. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | long oggpack_bits(oggpack_buffer *b);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    b
    36 |
    oggpack_buffer struct to be .
    37 |
    38 | 39 | 40 |

    Return Values

    41 |
    42 |
  • 43 | n is the total number of bits within the current buffer.
  • 44 |
    45 |

    46 | 47 |

    48 |


    49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_buffer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - datatype - oggpack_buffer 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_buffer

    17 | 18 |

    declared in "ogg/ogg.h"

    19 | 20 |

    21 | The oggpack_buffer struct is used with libogg's bitpacking functions. You should never need to directly access anything in this structure. 22 |

    23 | 24 | 25 | 26 | 38 | 39 |
    27 |
    
    28 | typedef struct {
    29 |   long endbyte;
    30 |   int  endbit;
    31 | 
    32 |   unsigned char *buffer;
    33 |   unsigned char *ptr;
    34 |   long storage;
    35 | } oggpack_buffer;
    36 | 
    37 |
    40 | 41 |

    Relevant Struct Members

    42 |
    43 |
    buffer
    44 |
    Pointer to data being manipulated.
    45 |
    ptr
    46 |
    Location pointer to mark which data has been read.
    47 |
    storage
    48 |
    Size of buffer. 49 |
    50 | 51 | 52 |

    53 |
    54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_bytes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_bytes 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_bytes

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function returns the total number of bytes behind the current 21 | access point in the oggpack_buffer. 22 | For write-initialized buffers, this is the number of complete bytes 23 | written so far. For read-initialized buffers, it is the number of 24 | complete bytes that have been read so far. 25 |

    The return value is the number of complete bytes in the buffer. 26 | There may be extra (<8) bits. 27 |

    28 | 29 | 30 | 35 | 36 |
    31 |
    
    32 | long oggpack_bytes(oggpack_buffer *b);
    33 | 
    34 |
    37 | 38 |

    Parameters

    39 |
    40 |
    b
    41 |
    oggpack_buffer struct to be checked.
    42 |
    43 | 44 | 45 |

    Return Values

    46 |
    47 |
  • 48 | n is the total number of bytes within the current buffer.
  • 49 |
    50 |

    51 | 52 |

    53 |


    54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |

    copyright © 2000-2010 xiph.org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_get_buffer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_get_buffer 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_get_buffer

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function returns a pointer to the data buffer within the given oggpack_buffer struct. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | unsigned char *oggpack_get_buffer(oggpack_buffer *b);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    b
    36 |
    Pointer to the current oggpack_buffer.
    37 |
    38 | 39 | 40 |

    Return Values

    41 |
    42 |
  • 43 | No values are returned.
  • 44 |
    45 |

    46 | 47 |

    48 |


    49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_look.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_look 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_look

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function looks at a specified number of bits inside the buffer without advancing the location pointer. 21 |

    The specified number of bits are read, starting from the location pointer. 22 |

    This function can be used to read 32 or fewer bits. 23 | 24 |

    25 | 26 | 27 | 32 | 33 |
    28 |
    
    29 | long  oggpack_look(oggpack_buffer *b,int bits);
    30 | 
    31 |
    34 | 35 |

    Parameters

    36 |
    37 |
    b
    38 |
    Pointer to oggpack_buffer to be read.
    39 |
    bits
    40 |
    Number of bits to look at. For this function, must be 32 or fewer.
    41 |
    42 | 43 | 44 |

    Return Values

    45 |
    46 |
  • 47 | n represents the requested bits.
  • 48 |
    49 |

    50 | 51 |

    52 |


    53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_look1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_look1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_look1

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function looks at the next bit without advancing the location pointer. 21 |

    The next bit is read starting from the location pointer. 22 | 23 |

    24 | 25 | 26 | 31 | 32 |
    27 |
    
    28 | long  oggpack_look1(oggpack_buffer *b);
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    b
    37 |
    Pointer to an oggpack_buffer struct containing our buffer.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • 44 | n represents the value of the next bit after the location pointer.
  • 45 |
    46 |

    47 | 48 |

    49 |


    50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_read.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_read 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_read

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function reads the requested number of bits from the buffer and advances the location pointer. 21 |

    Before reading, the buffer should be initialized using oggpack_readinit. 22 | 23 |

    24 | 25 | 26 | 31 | 32 |
    27 |
    
    28 | long oggpack_read(oggpack_buffer *b,int bits);
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    b
    37 |
    Pointer to an oggpack_buffer struct containing buffered data to be read.
    38 |
    bits
    39 |
    Number of bits to read.
    40 |
    41 | 42 | 43 |

    Return Values

    44 |
    45 |
  • 46 | n represents the requested bits.
  • 47 |
    48 |

    49 | 50 |

    51 |


    52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_read1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_read1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_read1

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function reads one bit from the oggpack_buffer data buffer and advances the location pointer. 21 |

    Before reading, the buffer should be initialized using oggpack_readinit. 22 | 23 |

    24 | 25 | 26 | 31 | 32 |
    27 |
    
    28 | long  oggpack_read1(oggpack_buffer *b);
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    b
    37 |
    Pointer to an oggpack_buffer struct containing buffered data to be read.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • 44 | n is the bit read by this function.
  • 45 |
    46 |

    47 | 48 |

    49 |


    50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_readinit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_readinit 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_readinit

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function takes an ordinary buffer and prepares an oggpack_buffer for reading using the Ogg bitpacking functions. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | void oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    b
    36 |
    Pointer to oggpack_buffer to be initialized with some extra markers to ease bit navigation and manipulation.
    37 |
    buf
    38 |
    Original data buffer, to be inserted into the oggpack_buffer so that it can be read using bitpacking functions. 39 |
    40 | 41 | 42 |

    Return Values

    43 |
    44 |
  • 45 | No values are returned.
  • 46 |
    47 |

    48 | 49 |

    50 |


    51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_reset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_reset 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_reset

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function resets the contents of an oggpack_buffer to their original state but does not free the memory used. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | void  oggpack_reset(oggpack_buffer *b);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    b
    36 |
    oggpack_buffer to be reset.
    37 |
    38 | 39 | 40 |

    Return Values

    41 |
    42 |
  • 43 | No values are returned.
  • 44 |
    45 |

    46 | 47 |

    48 |


    49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_write.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_write 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_write

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function writes bits into an oggpack_buffer. 21 |

    The oggpack_buffer must already be initialized for writing using oggpack_writeinit. 22 |

    Only 32 bits can be written at a time. 23 | 24 |

    25 | 26 | 27 | 32 | 33 |
    28 |
    
    29 | void  oggpack_write(oggpack_buffer *b,unsigned long value,int bits);
    30 | 
    31 |
    34 | 35 |

    Parameters

    36 |
    37 |
    b
    38 |
    Buffer to be used for writing.
    39 |
    value
    40 |
    The data to be written into the buffer. This must be 32 bits or fewer.
    41 |
    bits
    42 |
    The number of bits being written into the buffer.
    43 |
    44 | 45 | 46 |

    Return Values

    47 |
    48 |
  • 49 | No values are returned.
  • 50 |
    51 |

    52 | 53 |

    54 |


    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_writealign.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_writealign 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_writealign

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function pads the oggpack_buffer with zeros out to the 21 | next byte boundary.

    22 |

    The oggpack_buffer must already be initialized for writing using oggpack_writeinit. 23 |

    Only 32 bits can be written at a time.

    24 | 25 |

    26 | 27 | 28 | 33 | 34 |
    29 |
    
    30 | void  oggpack_writetrunc(oggpack_buffer *b);
    31 | 
    32 |
    35 | 36 |

    Parameters

    37 |
    38 |
    b
    39 |
    Buffer to be used for writing.
    40 |
    41 | 42 | 43 |

    Return Values

    44 |
    45 |
  • 46 | No values are returned.
  • 47 |
    48 |

    49 | 50 |

    51 |


    52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |

    copyright © 2000-2011 Xiph.Org Foundation

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_writeclear.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_reset 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_writeclear

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function clears the buffer after writing and frees the memory used by the oggpack_buffer. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | void oggpack_writeclear(oggpack_buffer *b);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    b
    36 |
    Our oggpack_buffer. This is an ordinary data buffer with some extra markers to ease bit navigation and manipulation.
    37 |
    38 | 39 | 40 |

    Return Values

    41 |
    42 |
  • 43 | No values are returned.
  • 44 |
    45 |

    46 | 47 |

    48 |


    49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_writecopy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_writecopy 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_writecopy

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function copies a sequence of bits from a source buffer into an 21 | oggpack_buffer.

    22 |

    The oggpack_buffer must already be initialized for writing using oggpack_writeinit.

    23 |

    Only 32 bits can be written at a time.

    24 | 25 |

    26 | 27 | 28 | 33 | 34 |
    29 |
    
    30 | void  oggpack_writecopy(oggpack_buffer *b, void *source, long bits);
    31 | 
    32 |
    35 | 36 |

    Parameters

    37 |
    38 |
    b
    39 |
    Buffer to be used for writing.
    40 |
    source
    41 |
    A pointer to the data to be written into the buffer.
    42 |
    bits
    43 |
    The number of bits to be copied into the buffer.
    44 |
    45 | 46 | 47 |

    Return Values

    48 |
    49 |
  • 50 | No values are returned.
  • 51 |
    52 |

    53 | 54 |

    55 |


    56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |

    copyright © 2000-2011 Xiph.Org Foundation

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_writeinit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_writeinit 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_writeinit

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function initializes an oggpack_buffer for writing using the Ogg bitpacking functions. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | void  oggpack_writeinit(oggpack_buffer *b);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    b
    36 |
    Buffer to be used for writing. This is an ordinary data buffer with some extra markers to ease bit navigation and manipulation.
    37 |
    38 | 39 | 40 |

    Return Values

    41 |
    42 |
  • 43 | No values are returned.
  • 44 |
    45 |

    46 | 47 |

    48 |


    49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/oggpack_writetrunc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - function - oggpack_writetrunc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    oggpack_writetrunc

    17 | 18 |

    declared in "ogg/ogg.h";

    19 | 20 |

    This function truncates an already written-to oggpack_buffer.

    21 |

    The oggpack_buffer must already be initialized for writing using oggpack_writeinit.

    22 | 23 |

    24 | 25 | 26 | 31 | 32 |
    27 |
    
    28 | void  oggpack_writetrunc(oggpack_buffer *b, long bits);
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    b
    37 |
    Buffer to be truncated.
    38 |
    bits
    39 |
    Number of bits to keep in the buffer (size after truncation)
    40 |
    41 | 42 | 43 |

    Return Values

    44 |
    45 |
  • 46 | No values are returned.
  • 47 |
    48 |

    49 | 50 |

    51 |


    52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |

    copyright © 2000-2011 Xiph.Org Foundation

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libogg - API Overview 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    libogg documentation

    libogg release 1.3.0 - 20110804

    15 | 16 |

    Libogg API Overview

    17 | 18 |

    19 | The libogg API consists of the following functional categories: 20 |

    21 |

    29 | 30 |

    31 |
    32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |

    copyright © 2000-2011 Xiph.Org

    Ogg Container Format

    libogg documentation

    libogg release 1.3.0 - 20110804

    41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /deps/libogg/doc/libogg/style.css: -------------------------------------------------------------------------------- 1 | BODY { font-family: Helvetica, sans-serif } 2 | TD { font-family: Helvetica, sans-serif } 3 | P { font-family: Helvetica, sans-serif } 4 | H1 { font-family: Helvetica, sans-serif } 5 | H2 { font-family: Helvetica, sans-serif } 6 | H4 { font-family: Helvetica, sans-serif } 7 | P.tiny { font-size: 8pt } 8 | -------------------------------------------------------------------------------- /deps/libogg/doc/stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/deps/libogg/doc/stream.png -------------------------------------------------------------------------------- /deps/libogg/doc/vorbisword2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/deps/libogg/doc/vorbisword2.png -------------------------------------------------------------------------------- /deps/libogg/doc/white-ogg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/deps/libogg/doc/white-ogg.png -------------------------------------------------------------------------------- /deps/libogg/doc/white-xifish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/deps/libogg/doc/white-xifish.png -------------------------------------------------------------------------------- /deps/libogg/include/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | SUBDIRS = ogg 4 | -------------------------------------------------------------------------------- /deps/libogg/include/ogg/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | oggincludedir = $(includedir)/ogg 4 | 5 | ogginclude_HEADERS = ogg.h os_types.h 6 | nodist_ogginclude_HEADERS = config_types.h 7 | -------------------------------------------------------------------------------- /deps/libogg/include/ogg/config_types.h.in: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure */ 5 | #define INCLUDE_INTTYPES_H @INCLUDE_INTTYPES_H@ 6 | #define INCLUDE_STDINT_H @INCLUDE_STDINT_H@ 7 | #define INCLUDE_SYS_TYPES_H @INCLUDE_SYS_TYPES_H@ 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef @SIZE16@ ogg_int16_t; 20 | typedef @USIZE16@ ogg_uint16_t; 21 | typedef @SIZE32@ ogg_int32_t; 22 | typedef @USIZE32@ ogg_uint32_t; 23 | typedef @SIZE64@ ogg_int64_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /deps/libogg/libogg.gyp: -------------------------------------------------------------------------------- 1 | # This file is used with the GYP meta build system. 2 | # http://code.google.com/p/gyp 3 | # To build try this: 4 | # svn co http://gyp.googlecode.com/svn/trunk gyp 5 | # ./gyp/gyp -f make --depth=. libogg.gyp 6 | # make 7 | # ./out/Debug/test 8 | 9 | { 10 | 'variables': { 11 | 'target_arch%': 'ia32', # built for a 32-bit CPU by default 12 | }, 13 | 'target_defaults': { 14 | 'default_configuration': 'Debug', 15 | 'configurations': { 16 | 'Debug': { 17 | 'defines': [ 'DEBUG', '_DEBUG' ], 18 | 'msvs_settings': { 19 | 'VCCLCompilerTool': { 20 | 'RuntimeLibrary': 1, # static debug 21 | }, 22 | }, 23 | }, 24 | 'Release': { 25 | 'defines': [ 'NDEBUG' ], 26 | 'msvs_settings': { 27 | 'VCCLCompilerTool': { 28 | 'RuntimeLibrary': 0, # static release 29 | }, 30 | }, 31 | } 32 | }, 33 | 'msvs_settings': { 34 | 'VCLinkerTool': { 35 | 'GenerateDebugInformation': 'true', 36 | }, 37 | }, 38 | 'conditions': [ 39 | ['OS=="mac"', { 40 | 'conditions': [ 41 | ['target_arch=="ia32"', { 'xcode_settings': { 'ARCHS': [ 'i386' ] } }], 42 | ['target_arch=="x64"', { 'xcode_settings': { 'ARCHS': [ 'x86_64' ] } }] 43 | ], 44 | }], 45 | ] 46 | }, 47 | 48 | 'targets': [ 49 | { 50 | 'target_name': 'libogg', 51 | 'product_prefix': '', 52 | 'type': 'static_library', 53 | 'sources': [ 54 | 'src/framing.c', 55 | 'src/bitwise.c', 56 | ], 57 | 'defines': [ 58 | 'PIC', 59 | 'HAVE_CONFIG_H', 60 | ], 61 | 'include_dirs': [ 62 | # platform and arch-specific headers 63 | 'config/<(OS)/<(target_arch)', 64 | 'include', 65 | ], 66 | 'direct_dependent_settings': { 67 | 'include_dirs': [ 68 | # platform and arch-specific headers 69 | 'config/<(OS)/<(target_arch)', 70 | 'include', 71 | ], 72 | }, 73 | }, 74 | 75 | { 76 | 'target_name': 'test', 77 | 'type': 'executable', 78 | 'dependencies': [ 'libogg' ], 79 | 'sources': [ 'test.c' ] 80 | }, 81 | ] 82 | } 83 | -------------------------------------------------------------------------------- /deps/libogg/macosx/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/deps/libogg/macosx/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /deps/libogg/macosx/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | Ogg 9 | CFBundleGetInfoString 10 | Ogg framework 1.1.4, Copyright © 1994-2009 Xiph.Org Foundation 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | org.xiph.ogg 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.1.4 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.1.4 25 | NSHumanReadableCopyright 26 | Ogg framework 1.1.4, Copyright © 1994-2009 Xiph.Org Foundation 27 | CSResourcesFileMapped 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /deps/libogg/macosx/Ogg_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Ogg' target in the 'Ogg' project. 3 | // 4 | 5 | #include 6 | -------------------------------------------------------------------------------- /deps/libogg/ogg-uninstalled.pc.in: -------------------------------------------------------------------------------- 1 | # ogg uninstalled pkg-config file 2 | 3 | prefix= 4 | exec_prefix= 5 | libdir=${pcfiledir}/src 6 | includedir=${pcfiledir}/include 7 | 8 | Name: ogg 9 | Description: ogg is a library for manipulating ogg bitstreams (not installed) 10 | Version: @VERSION@ 11 | Requires: 12 | Conflicts: 13 | Libs: ${libdir}/libogg.la 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /deps/libogg/ogg.pc.in: -------------------------------------------------------------------------------- 1 | # ogg pkg-config file 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: ogg 9 | Description: ogg is a library for manipulating ogg bitstreams 10 | Version: @VERSION@ 11 | Requires: 12 | Conflicts: 13 | Libs: -L${libdir} -logg 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /deps/libogg/src/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 4 | 5 | lib_LTLIBRARIES = libogg.la 6 | 7 | libogg_la_SOURCES = framing.c bitwise.c 8 | libogg_la_LDFLAGS = -no-undefined -version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@ 9 | 10 | # build and run the self tests on 'make check' 11 | 12 | noinst_PROGRAMS = test_bitwise test_framing 13 | 14 | test_bitwise_SOURCES = bitwise.c 15 | test_bitwise_CFLAGS = -D_V_SELFTEST 16 | 17 | test_framing_SOURCES = framing.c 18 | test_framing_CFLAGS = -D_V_SELFTEST 19 | 20 | check: $(noinst_PROGRAMS) 21 | ./test_bitwise$(EXEEXT) 22 | ./test_framing$(EXEEXT) 23 | 24 | debug: 25 | $(MAKE) all CFLAGS="@DEBUG@" 26 | 27 | profile: 28 | $(MAKE) all CFLAGS="@PROFILE@" 29 | -------------------------------------------------------------------------------- /deps/libogg/win32/VS2003/ogg.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg", "libogg\libogg.vcproj", "{15CBFEFF-7965-41F5-B4E2-21E8795C9159}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Release = Release 10 | Release_SSE = Release_SSE 11 | Release_SSE2 = Release_SSE2 12 | EndGlobalSection 13 | GlobalSection(ProjectConfiguration) = postSolution 14 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug.ActiveCfg = Debug|Win32 15 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug.Build.0 = Debug|Win32 16 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release.ActiveCfg = Release|Win32 17 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release.Build.0 = Release|Win32 18 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE.ActiveCfg = Release_SSE|Win32 19 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE.Build.0 = Release_SSE|Win32 20 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE2.ActiveCfg = Release_SSE2|Win32 21 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE2.Build.0 = Release_SSE2|Win32 22 | EndGlobalSection 23 | GlobalSection(ExtensibilityGlobals) = postSolution 24 | EndGlobalSection 25 | GlobalSection(ExtensibilityAddIns) = postSolution 26 | EndGlobalSection 27 | EndGlobal 28 | -------------------------------------------------------------------------------- /deps/libogg/win32/VS2008/libogg_dynamic.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg", "libogg_dynamic.vcproj", "{15CBFEFF-7965-41F5-B4E2-21E8795C9159}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Debug|x64 = Debug|x64 10 | Release_SSE|Win32 = Release_SSE|Win32 11 | Release_SSE|x64 = Release_SSE|x64 12 | Release_SSE2|Win32 = Release_SSE2|Win32 13 | Release_SSE2|x64 = Release_SSE2|x64 14 | Release|Win32 = Release|Win32 15 | Release|x64 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|Win32.Build.0 = Debug|Win32 20 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|x64.ActiveCfg = Debug|x64 21 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|x64.Build.0 = Debug|x64 22 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE|Win32.ActiveCfg = Release_SSE|Win32 23 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE|Win32.Build.0 = Release_SSE|Win32 24 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE|x64.ActiveCfg = Release_SSE|x64 25 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE|x64.Build.0 = Release_SSE|x64 26 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE2|Win32.ActiveCfg = Release_SSE2|Win32 27 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE2|Win32.Build.0 = Release_SSE2|Win32 28 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE2|x64.ActiveCfg = Release_SSE2|x64 29 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE2|x64.Build.0 = Release_SSE2|x64 30 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|Win32.ActiveCfg = Release|Win32 31 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|Win32.Build.0 = Release|Win32 32 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|x64.ActiveCfg = Release|x64 33 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|x64.Build.0 = Release|x64 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | EndGlobal 39 | -------------------------------------------------------------------------------- /deps/libogg/win32/VS2008/libogg_static.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg_static", "libogg_static.vcproj", "{15CBFEFF-7965-41F5-B4E2-21E8795C9159}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Debug|x64 = Debug|x64 10 | Release_SSE|Win32 = Release_SSE|Win32 11 | Release_SSE|x64 = Release_SSE|x64 12 | Release_SSE2|Win32 = Release_SSE2|Win32 13 | Release_SSE2|x64 = Release_SSE2|x64 14 | Release|Win32 = Release|Win32 15 | Release|x64 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|Win32.Build.0 = Debug|Win32 20 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|x64.ActiveCfg = Debug|x64 21 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|x64.Build.0 = Debug|x64 22 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE|Win32.ActiveCfg = Release_SSE|Win32 23 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE|Win32.Build.0 = Release_SSE|Win32 24 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE|x64.ActiveCfg = Release_SSE|x64 25 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE|x64.Build.0 = Release_SSE|x64 26 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE2|Win32.ActiveCfg = Release_SSE2|Win32 27 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE2|Win32.Build.0 = Release_SSE2|Win32 28 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE2|x64.ActiveCfg = Release_SSE2|x64 29 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release_SSE2|x64.Build.0 = Release_SSE2|x64 30 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|Win32.ActiveCfg = Release|Win32 31 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|Win32.Build.0 = Release|Win32 32 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|x64.ActiveCfg = Release|x64 33 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|x64.Build.0 = Release|x64 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | EndGlobal 39 | -------------------------------------------------------------------------------- /deps/libogg/win32/VS2010/.vs/libogg_dynamic/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/deps/libogg/win32/VS2010/.vs/libogg_dynamic/v15/.suo -------------------------------------------------------------------------------- /deps/libogg/win32/VS2010/.vs/libogg_dynamic/v15/Browse.VC.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/deps/libogg/win32/VS2010/.vs/libogg_dynamic/v15/Browse.VC.db -------------------------------------------------------------------------------- /deps/libogg/win32/VS2010/.vs/libogg_dynamic/v15/ipch/AutoPCH/1ba763800dc74d2b/FRAMING.ipch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/deps/libogg/win32/VS2010/.vs/libogg_dynamic/v15/ipch/AutoPCH/1ba763800dc74d2b/FRAMING.ipch -------------------------------------------------------------------------------- /deps/libogg/win32/VS2010/.vs/libogg_dynamic/v15/ipch/AutoPCH/3766b4fc1dfa998c/BITWISE.ipch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/deps/libogg/win32/VS2010/.vs/libogg_dynamic/v15/ipch/AutoPCH/3766b4fc1dfa998c/BITWISE.ipch -------------------------------------------------------------------------------- /deps/libogg/win32/VS2010/libogg_dynamic.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg", "libogg_dynamic.vcxproj", "{15CBFEFF-7965-41F5-B4E2-21E8795C9159}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Debug|x64 = Debug|x64 10 | Release|Win32 = Release|Win32 11 | Release|x64 = Release|x64 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|Win32.Build.0 = Debug|Win32 16 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|x64.ActiveCfg = Debug|x64 17 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|x64.Build.0 = Debug|x64 18 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|Win32.ActiveCfg = Release|Win32 19 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|Win32.Build.0 = Release|Win32 20 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|x64.ActiveCfg = Release|x64 21 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|x64.Build.0 = Release|x64 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /deps/libogg/win32/VS2010/libogg_static.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg_static", "libogg_static.vcxproj", "{15CBFEFF-7965-41F5-B4E2-21E8795C9159}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Debug|x64 = Debug|x64 10 | Release|Win32 = Release|Win32 11 | Release|x64 = Release|x64 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|Win32.Build.0 = Debug|Win32 16 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|x64.ActiveCfg = Debug|x64 17 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Debug|x64.Build.0 = Debug|x64 18 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|Win32.ActiveCfg = Release|Win32 19 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|Win32.Build.0 = Release|Win32 20 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|x64.ActiveCfg = Release|x64 21 | {15CBFEFF-7965-41F5-B4E2-21E8795C9159}.Release|x64.Build.0 = Release|x64 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /deps/libogg/win32/VS6/build_ogg_dynamic.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo ---+++--- Building Ogg (Dynamic) ---+++--- 3 | 4 | if .%SRCROOT%==. set SRCROOT=i:\xiph 5 | 6 | set OLDPATH=%PATH% 7 | set OLDINCLUDE=%INCLUDE% 8 | set OLDLIB=%LIB% 9 | 10 | call "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat" 11 | echo Setting include paths for Ogg 12 | set INCLUDE=%INCLUDE%;%SRCROOT%\ogg\include 13 | echo Compiling... 14 | msdev ogg_dynamic.dsp /useenv /make "ogg_dynamic - Win32 Release" /rebuild 15 | 16 | set PATH=%OLDPATH% 17 | set INCLUDE=%OLDINCLUDE% 18 | set LIB=%OLDLIB% 19 | -------------------------------------------------------------------------------- /deps/libogg/win32/VS6/build_ogg_dynamic_debug.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo ---+++--- Building Ogg (Dynamic) ---+++--- 3 | 4 | if .%SRCROOT%==. set SRCROOT=i:\xiph 5 | 6 | set OLDPATH=%PATH% 7 | set OLDINCLUDE=%INCLUDE% 8 | set OLDLIB=%LIB% 9 | 10 | call "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat" 11 | echo Setting include paths for Ogg 12 | set INCLUDE=%INCLUDE%;%SRCROOT%\ogg\include 13 | echo Compiling... 14 | msdev ogg_dynamic.dsp /useenv /make "ogg_dynamic - Win32 Debug" /rebuild 15 | 16 | set PATH=%OLDPATH% 17 | set INCLUDE=%OLDINCLUDE% 18 | set LIB=%OLDLIB% 19 | -------------------------------------------------------------------------------- /deps/libogg/win32/VS6/build_ogg_static.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo ---+++--- Building Ogg (Static) ---+++--- 3 | 4 | if .%SRCROOT%==. set SRCROOT=i:\xiph 5 | 6 | set OLDPATH=%PATH% 7 | set OLDINCLUDE=%INCLUDE% 8 | set OLDLIB=%LIB% 9 | 10 | call "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat" 11 | echo Setting include paths for Ogg 12 | set INCLUDE=%INCLUDE%;%SRCROOT%\ogg\include 13 | echo Compiling... 14 | msdev ogg_static.dsp /useenv /make "ogg_static - Win32 Release" /rebuild 15 | 16 | set PATH=%OLDPATH% 17 | set INCLUDE=%OLDINCLUDE% 18 | set LIB=%OLDLIB% 19 | -------------------------------------------------------------------------------- /deps/libogg/win32/VS6/build_ogg_static_debug.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo ---+++--- Building Ogg (Static) ---+++--- 3 | 4 | if .%SRCROOT%==. set SRCROOT=i:\xiph 5 | 6 | set OLDPATH=%PATH% 7 | set OLDINCLUDE=%INCLUDE% 8 | set OLDLIB=%LIB% 9 | 10 | call "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat" 11 | echo Setting include paths for Ogg 12 | set INCLUDE=%INCLUDE%;%SRCROOT%\ogg\include 13 | echo Compiling... 14 | msdev ogg_static.dsp /useenv /make "ogg_static - Win32 Debug" /rebuild 15 | 16 | set PATH=%OLDPATH% 17 | set INCLUDE=%OLDINCLUDE% 18 | set LIB=%OLDLIB% 19 | -------------------------------------------------------------------------------- /deps/libogg/win32/VS6/ogg.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "ogg_dynamic"=.\ogg_dynamic.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "ogg_static"=.\ogg_static.dsp - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Global: 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<3> 37 | {{{ 38 | }}} 39 | 40 | ############################################################################### 41 | 42 | -------------------------------------------------------------------------------- /deps/libogg/win32/ogg.def: -------------------------------------------------------------------------------- 1 | ; $Id: ogg.def 14733 2008-04-14 21:27:06Z sping $ 2 | ; 3 | ; ogg.def 4 | ; 5 | LIBRARY 6 | EXPORTS 7 | ; 8 | oggpack_writeinit 9 | oggpack_writetrunc 10 | oggpack_writealign 11 | oggpack_writecopy 12 | oggpack_reset 13 | oggpack_writeclear 14 | oggpack_readinit 15 | oggpack_write 16 | oggpack_look 17 | oggpack_look1 18 | oggpack_adv 19 | oggpack_adv1 20 | oggpack_read 21 | oggpack_read1 22 | oggpack_bytes 23 | oggpack_bits 24 | oggpack_get_buffer 25 | ; 26 | oggpackB_writeinit 27 | oggpackB_writetrunc 28 | oggpackB_writealign 29 | oggpackB_writecopy 30 | oggpackB_reset 31 | oggpackB_writeclear 32 | oggpackB_readinit 33 | oggpackB_write 34 | oggpackB_look 35 | oggpackB_look1 36 | oggpackB_adv 37 | oggpackB_adv1 38 | oggpackB_read 39 | oggpackB_read1 40 | oggpackB_bytes 41 | oggpackB_bits 42 | oggpackB_get_buffer 43 | ; 44 | ogg_stream_packetin 45 | ogg_stream_pageout 46 | ogg_stream_flush 47 | ; 48 | ogg_sync_init 49 | ogg_sync_clear 50 | ogg_sync_reset 51 | ogg_sync_destroy 52 | ogg_sync_buffer 53 | ogg_sync_wrote 54 | ogg_sync_pageseek 55 | ogg_sync_pageout 56 | ogg_stream_pagein 57 | ogg_stream_packetout 58 | ogg_stream_packetpeek 59 | ; 60 | ogg_stream_init 61 | ogg_stream_clear 62 | ogg_stream_reset 63 | ogg_stream_reset_serialno 64 | ogg_stream_destroy 65 | ogg_stream_eos 66 | ; 67 | ogg_page_checksum_set 68 | ogg_page_version 69 | ogg_page_continued 70 | ogg_page_bos 71 | ogg_page_eos 72 | ogg_page_granulepos 73 | ogg_page_serialno 74 | ogg_page_pageno 75 | ogg_page_packets 76 | ogg_packet_clear 77 | 78 | 79 | -------------------------------------------------------------------------------- /deps/libopus/AUTHORS: -------------------------------------------------------------------------------- 1 | Jean-Marc Valin (jmvalin@jmvalin.ca) 2 | Koen Vos (koenvos74@gmail.com) 3 | Timothy Terriberry (tterribe@xiph.org) 4 | Karsten Vandborg Sorensen (karsten.vandborg.sorensen@skype.net) 5 | Soren Skak Jensen (ssjensen@gn.com) 6 | Gregory Maxwell (greg@xiph.org) 7 | -------------------------------------------------------------------------------- /deps/libopus/COPYING: -------------------------------------------------------------------------------- 1 | Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, 2 | Jean-Marc Valin, Timothy B. Terriberry, 3 | CSIRO, Gregory Maxwell, Mark Borgerding, 4 | Erik de Castro Lopo 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 10 | - Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | - Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 18 | names of specific contributors, may be used to endorse or promote 19 | products derived from this software without specific prior written 20 | permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 26 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | Opus is subject to the royalty-free patent licenses which are 35 | specified at: 36 | 37 | Xiph.Org Foundation: 38 | https://datatracker.ietf.org/ipr/1524/ 39 | 40 | Microsoft Corporation: 41 | https://datatracker.ietf.org/ipr/1914/ 42 | 43 | Broadcom Corporation: 44 | https://datatracker.ietf.org/ipr/1526/ 45 | -------------------------------------------------------------------------------- /deps/libopus/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/deps/libopus/ChangeLog -------------------------------------------------------------------------------- /deps/libopus/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/deps/libopus/NEWS -------------------------------------------------------------------------------- /deps/libopus/OpusConfig.cmake.in: -------------------------------------------------------------------------------- 1 | set(OPUS_VERSION @PROJECT_VERSION@) 2 | set(OPUS_VERSION_STRING @PROJECT_VERSION@) 3 | set(OPUS_VERSION_MAJOR @PROJECT_VERSION_MAJOR@) 4 | set(OPUS_VERSION_MINOR @PROJECT_VERSION_MINOR@) 5 | set(OPUS_VERSION_PATCH @PROJECT_VERSION_PATCH@) 6 | 7 | @PACKAGE_INIT@ 8 | 9 | set_and_check(OPUS_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") 10 | set_and_check(OPUS_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@") 11 | 12 | include(${CMAKE_CURRENT_LIST_DIR}/OpusTargets.cmake) 13 | 14 | set(OPUS_LIBRARY Opus::opus) 15 | set(OPUS_LIBRARIES Opus::opus) 16 | 17 | check_required_components(Opus) 18 | 19 | set(OPUS_FOUND 1) 20 | -------------------------------------------------------------------------------- /deps/libopus/celt/arm/armopts.s.in: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013 Mozilla Corporation */ 2 | /* 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 18 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 21 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | ; Set the following to 1 if we have EDSP instructions 28 | ; (LDRD/STRD, etc., ARMv5E and later). 29 | OPUS_ARM_MAY_HAVE_EDSP * @OPUS_ARM_MAY_HAVE_EDSP@ 30 | 31 | ; Set the following to 1 if we have ARMv6 media instructions. 32 | OPUS_ARM_MAY_HAVE_MEDIA * @OPUS_ARM_MAY_HAVE_MEDIA@ 33 | 34 | ; Set the following to 1 if we have NEON (some ARMv7) 35 | OPUS_ARM_MAY_HAVE_NEON * @OPUS_ARM_MAY_HAVE_NEON@ 36 | 37 | END 38 | -------------------------------------------------------------------------------- /deps/libopus/celt/arm/fixed_arm64.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2015 Vidyo */ 2 | /* 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 18 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 21 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #ifndef FIXED_ARM64_H 28 | #define FIXED_ARM64_H 29 | 30 | #include 31 | 32 | #undef SIG2WORD16 33 | #define SIG2WORD16(x) (vqmovns_s32(PSHR32((x), SIG_SHIFT))) 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /deps/libopus/celt/celt_lpc.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009-2010 Xiph.Org Foundation 2 | Written by Jean-Marc Valin */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef PLC_H 29 | #define PLC_H 30 | 31 | #include "arch.h" 32 | #include "cpu_support.h" 33 | 34 | #if defined(OPUS_X86_MAY_HAVE_SSE4_1) 35 | #include "x86/celt_lpc_sse.h" 36 | #endif 37 | 38 | #define LPC_ORDER 24 39 | 40 | void _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p); 41 | 42 | void celt_fir_c( 43 | const opus_val16 *x, 44 | const opus_val16 *num, 45 | opus_val16 *y, 46 | int N, 47 | int ord, 48 | int arch); 49 | 50 | #if !defined(OVERRIDE_CELT_FIR) 51 | #define celt_fir(x, num, y, N, ord, arch) \ 52 | (celt_fir_c(x, num, y, N, ord, arch)) 53 | #endif 54 | 55 | void celt_iir(const opus_val32 *x, 56 | const opus_val16 *den, 57 | opus_val32 *y, 58 | int N, 59 | int ord, 60 | opus_val16 *mem, 61 | int arch); 62 | 63 | int _celt_autocorr(const opus_val16 *x, opus_val32 *ac, 64 | const opus_val16 *window, int overlap, int lag, int n, int arch); 65 | 66 | #endif /* PLC_H */ 67 | -------------------------------------------------------------------------------- /deps/libopus/celt/cwrs.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007-2008 CSIRO 2 | Copyright (c) 2007-2009 Xiph.Org Foundation 3 | Copyright (c) 2007-2009 Timothy B. Terriberry 4 | Written by Timothy B. Terriberry and Jean-Marc Valin */ 5 | /* 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 10 | - Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | - Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 21 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef CWRS_H 31 | #define CWRS_H 32 | 33 | #include "arch.h" 34 | #include "stack_alloc.h" 35 | #include "entenc.h" 36 | #include "entdec.h" 37 | 38 | #ifdef CUSTOM_MODES 39 | int log2_frac(opus_uint32 val, int frac); 40 | #endif 41 | 42 | void get_required_bits(opus_int16 *bits, int N, int K, int frac); 43 | 44 | void encode_pulses(const int *_y, int N, int K, ec_enc *enc); 45 | 46 | opus_val32 decode_pulses(int *_y, int N, int K, ec_dec *dec); 47 | 48 | #endif /* CWRS_H */ 49 | -------------------------------------------------------------------------------- /deps/libopus/celt/laplace.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007 CSIRO 2 | Copyright (c) 2007-2009 Xiph.Org Foundation 3 | Written by Jean-Marc Valin */ 4 | /* 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 20 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #include "entenc.h" 30 | #include "entdec.h" 31 | 32 | /** Encode a value that is assumed to be the realisation of a 33 | Laplace-distributed random process 34 | @param enc Entropy encoder state 35 | @param value Value to encode 36 | @param fs Probability of 0, multiplied by 32768 37 | @param decay Probability of the value +/- 1, multiplied by 16384 38 | */ 39 | void ec_laplace_encode(ec_enc *enc, int *value, unsigned fs, int decay); 40 | 41 | /** Decode a value that is assumed to be the realisation of a 42 | Laplace-distributed random process 43 | @param dec Entropy decoder state 44 | @param fs Probability of 0, multiplied by 32768 45 | @param decay Probability of the value +/- 1, multiplied by 16384 46 | @return Value decoded 47 | */ 48 | int ec_laplace_decode(ec_dec *dec, unsigned fs, int decay); 49 | -------------------------------------------------------------------------------- /deps/libopus/celt/mfrngcod.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2001-2008 Timothy B. Terriberry 2 | Copyright (c) 2008-2009 Xiph.Org Foundation */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #if !defined(_mfrngcode_H) 29 | # define _mfrngcode_H (1) 30 | # include "entcode.h" 31 | 32 | /*Constants used by the entropy encoder/decoder.*/ 33 | 34 | /*The number of bits to output at a time.*/ 35 | # define EC_SYM_BITS (8) 36 | /*The total number of bits in each of the state registers.*/ 37 | # define EC_CODE_BITS (32) 38 | /*The maximum symbol value.*/ 39 | # define EC_SYM_MAX ((1U<>EC_SYM_BITS) 46 | /*The number of bits available for the last, partial symbol in the code field.*/ 47 | # define EC_CODE_EXTRA ((EC_CODE_BITS-2)%EC_SYM_BITS+1) 48 | #endif 49 | -------------------------------------------------------------------------------- /deps/libopus/celt/tests/test_unit_types.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008-2011 Xiph.Org Foundation 2 | Written by Jean-Marc Valin */ 3 | /* 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "opus_types.h" 33 | #include 34 | 35 | int main(void) 36 | { 37 | opus_int16 i = 1; 38 | i <<= 14; 39 | if (i>>14 != 1) 40 | { 41 | fprintf(stderr, "opus_int16 isn't 16 bits\n"); 42 | return 1; 43 | } 44 | if (sizeof(opus_int16)*2 != sizeof(opus_int32)) 45 | { 46 | fprintf(stderr, "16*2 != 32\n"); 47 | return 1; 48 | } 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /deps/libopus/celt/x86/celt_lpc_sse.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, Cisco Systems, INC 2 | Written by XiangMingZhu WeiZhou MinPeng YanWang 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef CELT_LPC_SSE_H 29 | #define CELT_LPC_SSE_H 30 | 31 | #ifdef HAVE_CONFIG_H 32 | #include "config.h" 33 | #endif 34 | 35 | #if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT) 36 | #define OVERRIDE_CELT_FIR 37 | 38 | void celt_fir_sse4_1( 39 | const opus_val16 *x, 40 | const opus_val16 *num, 41 | opus_val16 *y, 42 | int N, 43 | int ord, 44 | int arch); 45 | 46 | #if defined(OPUS_X86_PRESUME_SSE4_1) 47 | #define celt_fir(x, num, y, N, ord, arch) \ 48 | ((void)arch, celt_fir_sse4_1(x, num, y, N, ord, arch)) 49 | 50 | #else 51 | 52 | extern void (*const CELT_FIR_IMPL[OPUS_ARCHMASK + 1])( 53 | const opus_val16 *x, 54 | const opus_val16 *num, 55 | opus_val16 *y, 56 | int N, 57 | int ord, 58 | int arch); 59 | 60 | # define celt_fir(x, num, y, N, ord, arch) \ 61 | ((*CELT_FIR_IMPL[(arch) & OPUS_ARCHMASK])(x, num, y, N, ord, arch)) 62 | 63 | #endif 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /deps/libopus/celt/x86/vq_sse.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2016 Jean-Marc Valin */ 2 | /* 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 18 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 21 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #ifndef VQ_SSE_H 28 | #define VQ_SSE_H 29 | 30 | #if defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(FIXED_POINT) 31 | #define OVERRIDE_OP_PVQ_SEARCH 32 | 33 | opus_val16 op_pvq_search_sse2(celt_norm *_X, int *iy, int K, int N, int arch); 34 | 35 | #if defined(OPUS_X86_PRESUME_SSE2) 36 | #define op_pvq_search(x, iy, K, N, arch) \ 37 | (op_pvq_search_sse2(x, iy, K, N, arch)) 38 | 39 | #else 40 | 41 | extern opus_val16 (*const OP_PVQ_SEARCH_IMPL[OPUS_ARCHMASK + 1])( 42 | celt_norm *_X, int *iy, int K, int N, int arch); 43 | 44 | # define op_pvq_search(X, iy, K, N, arch) \ 45 | ((*OP_PVQ_SEARCH_IMPL[(arch) & OPUS_ARCHMASK])(X, iy, K, N, arch)) 46 | 47 | #endif 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /deps/libopus/celt_headers.mk: -------------------------------------------------------------------------------- 1 | CELT_HEAD = \ 2 | celt/arch.h \ 3 | celt/bands.h \ 4 | celt/celt.h \ 5 | celt/cpu_support.h \ 6 | include/opus_types.h \ 7 | include/opus_defines.h \ 8 | include/opus_custom.h \ 9 | celt/cwrs.h \ 10 | celt/ecintrin.h \ 11 | celt/entcode.h \ 12 | celt/entdec.h \ 13 | celt/entenc.h \ 14 | celt/fixed_debug.h \ 15 | celt/fixed_generic.h \ 16 | celt/float_cast.h \ 17 | celt/_kiss_fft_guts.h \ 18 | celt/kiss_fft.h \ 19 | celt/laplace.h \ 20 | celt/mathops.h \ 21 | celt/mdct.h \ 22 | celt/mfrngcod.h \ 23 | celt/modes.h \ 24 | celt/os_support.h \ 25 | celt/pitch.h \ 26 | celt/celt_lpc.h \ 27 | celt/x86/celt_lpc_sse.h \ 28 | celt/quant_bands.h \ 29 | celt/rate.h \ 30 | celt/stack_alloc.h \ 31 | celt/vq.h \ 32 | celt/static_modes_float.h \ 33 | celt/static_modes_fixed.h \ 34 | celt/static_modes_float_arm_ne10.h \ 35 | celt/static_modes_fixed_arm_ne10.h \ 36 | celt/arm/armcpu.h \ 37 | celt/arm/fixed_armv4.h \ 38 | celt/arm/fixed_armv5e.h \ 39 | celt/arm/fixed_arm64.h \ 40 | celt/arm/kiss_fft_armv4.h \ 41 | celt/arm/kiss_fft_armv5e.h \ 42 | celt/arm/pitch_arm.h \ 43 | celt/arm/fft_arm.h \ 44 | celt/arm/mdct_arm.h \ 45 | celt/mips/celt_mipsr1.h \ 46 | celt/mips/fixed_generic_mipsr1.h \ 47 | celt/mips/kiss_fft_mipsr1.h \ 48 | celt/mips/mdct_mipsr1.h \ 49 | celt/mips/pitch_mipsr1.h \ 50 | celt/mips/vq_mipsr1.h \ 51 | celt/x86/pitch_sse.h \ 52 | celt/x86/vq_sse.h \ 53 | celt/x86/x86cpu.h 54 | -------------------------------------------------------------------------------- /deps/libopus/celt_sources.mk: -------------------------------------------------------------------------------- 1 | CELT_SOURCES = \ 2 | celt/bands.c \ 3 | celt/celt.c \ 4 | celt/celt_encoder.c \ 5 | celt/celt_decoder.c \ 6 | celt/cwrs.c \ 7 | celt/entcode.c \ 8 | celt/entdec.c \ 9 | celt/entenc.c \ 10 | celt/kiss_fft.c \ 11 | celt/laplace.c \ 12 | celt/mathops.c \ 13 | celt/mdct.c \ 14 | celt/modes.c \ 15 | celt/pitch.c \ 16 | celt/celt_lpc.c \ 17 | celt/quant_bands.c \ 18 | celt/rate.c \ 19 | celt/vq.c 20 | 21 | CELT_SOURCES_SSE = \ 22 | celt/x86/x86cpu.c \ 23 | celt/x86/x86_celt_map.c \ 24 | celt/x86/pitch_sse.c 25 | 26 | CELT_SOURCES_SSE2 = \ 27 | celt/x86/pitch_sse2.c \ 28 | celt/x86/vq_sse2.c 29 | 30 | CELT_SOURCES_SSE4_1 = \ 31 | celt/x86/celt_lpc_sse4_1.c \ 32 | celt/x86/pitch_sse4_1.c 33 | 34 | CELT_SOURCES_ARM = \ 35 | celt/arm/armcpu.c \ 36 | celt/arm/arm_celt_map.c 37 | 38 | CELT_SOURCES_ARM_ASM = \ 39 | celt/arm/celt_pitch_xcorr_arm.s 40 | 41 | CELT_AM_SOURCES_ARM_ASM = \ 42 | celt/arm/armopts.s.in 43 | 44 | CELT_SOURCES_ARM_NEON_INTR = \ 45 | celt/arm/celt_neon_intr.c \ 46 | celt/arm/pitch_neon_intr.c 47 | 48 | CELT_SOURCES_ARM_NE10 = \ 49 | celt/arm/celt_fft_ne10.c \ 50 | celt/arm/celt_mdct_ne10.c 51 | -------------------------------------------------------------------------------- /deps/libopus/config.h.cmake.in: -------------------------------------------------------------------------------- 1 | #cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@" -------------------------------------------------------------------------------- /deps/libopus/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | DOCINPUTS = $(top_srcdir)/include/opus.h \ 4 | $(top_srcdir)/include/opus_multistream.h \ 5 | $(top_srcdir)/include/opus_defines.h \ 6 | $(top_srcdir)/include/opus_types.h \ 7 | $(top_srcdir)/include/opus_custom.h \ 8 | $(top_srcdir)/doc/header.html \ 9 | $(top_srcdir)/doc/footer.html \ 10 | $(top_srcdir)/doc/customdoxygen.css 11 | 12 | EXTRA_DIST = customdoxygen.css Doxyfile.in footer.html header.html \ 13 | opus_logo.svg trivial_example.c 14 | 15 | 16 | if HAVE_DOXYGEN 17 | 18 | all-local: doxygen-build.stamp 19 | 20 | doxygen-build.stamp: Doxyfile $(DOCINPUTS) 21 | doxygen 22 | touch $@ 23 | 24 | install-data-local: 25 | $(INSTALL) -d $(DESTDIR)$(docdir)/html/search 26 | for f in `find html -type f \! -name "installdox"`; do \ 27 | $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \ 28 | done 29 | 30 | $(INSTALL) -d $(DESTDIR)$(mandir)/man3 31 | cd man && find man3 -type f -name opus_*.3 \ 32 | -exec $(INSTALL_DATA) \{} $(DESTDIR)$(mandir)/man3 \; 33 | 34 | clean-local: 35 | $(RM) -r html 36 | $(RM) -r latex 37 | $(RM) -r man 38 | $(RM) doxygen-build.stamp 39 | $(RM) doxygen_sqlite3.db 40 | 41 | uninstall-local: 42 | $(RM) -r $(DESTDIR)$(docdir)/html 43 | $(RM) $(DESTDIR)$(mandir)/man3/opus_*.3 $(DESTDIR)$(mandir)/man3/opus.h.3 44 | 45 | endif 46 | -------------------------------------------------------------------------------- /deps/libopus/doc/TODO: -------------------------------------------------------------------------------- 1 | define audio bandwidth as frequency range 2 | 3 | repeat padding recommendation 4 | 5 | ptime: refer to RFC 6 | 7 | Opus does not provide any confidentiality or integrity protection 8 | -------------------------------------------------------------------------------- /deps/libopus/doc/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 23 | 24 | 25 |
    14 | For more information visit the Opus Website. 15 | 17 | 22 |
    26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /deps/libopus/doc/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $projectname: $title 7 | $title 8 | 9 | 10 | $treeview 11 | $search 12 | $mathjax 13 | 14 | 15 |
    16 | 17 | 18 |
    19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 37 | 38 | 39 | 40 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
    27 |
    Opus
    28 |
    30 | 33 | 35 |
    31 |
    $projectbrief
    32 |
    $projectnumber 34 |
    36 |
    41 |
    $projectbrief
    42 |
    $searchbox
    53 |
    54 | 55 | -------------------------------------------------------------------------------- /deps/libopus/m4/ax_add_fortify_source.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # Modified from https://www.gnu.org/software/autoconf-archive/ax_add_fortify_source.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_ADD_FORTIFY_SOURCE 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check whether -D_FORTIFY_SOURCE=2 can be added to CFLAGS without macro 12 | # redefinition warnings. Some distributions (such as Gentoo Linux) enable 13 | # _FORTIFY_SOURCE globally in their compilers, leading to unnecessary 14 | # warnings in the form of 15 | # 16 | # :0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] 17 | # : note: this is the location of the previous definition 18 | # 19 | # which is a problem if -Werror is enabled. This macro checks whether 20 | # _FORTIFY_SOURCE is already defined, and if not, adds -D_FORTIFY_SOURCE=2 21 | # to CFLAGS. 22 | # 23 | # LICENSE 24 | # 25 | # Copyright (c) 2017 David Seifert 26 | # 27 | # Copying and distribution of this file, with or without modification, are 28 | # permitted in any medium without royalty provided the copyright notice 29 | # and this notice are preserved. This file is offered as-is, without any 30 | # warranty. 31 | 32 | #serial 1 33 | 34 | AC_DEFUN([AX_ADD_FORTIFY_SOURCE],[ 35 | AC_MSG_CHECKING([whether to add -D_FORTIFY_SOURCE=2 to CFLAGS]) 36 | AC_LINK_IFELSE([ 37 | AC_LANG_SOURCE( 38 | [[ 39 | int main() { 40 | #ifndef _FORTIFY_SOURCE 41 | return 0; 42 | #else 43 | this_is_an_error; 44 | #endif 45 | } 46 | ]] 47 | )], [ 48 | AC_MSG_RESULT([yes]) 49 | CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" 50 | ], [ 51 | AC_MSG_RESULT([no]) 52 | ]) 53 | ]) 54 | -------------------------------------------------------------------------------- /deps/libopus/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 4179 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) 16 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.6' 20 | macro_revision='2.4.6' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /deps/libopus/m4/opus-intrinsics.m4: -------------------------------------------------------------------------------- 1 | dnl opus-intrinsics.m4 2 | dnl macro for testing for support for compiler intrinsics, either by default or with a compiler flag 3 | 4 | dnl OPUS_CHECK_INTRINSICS(NAME-OF-INTRINSICS, COMPILER-FLAG-FOR-INTRINSICS, VAR-IF-PRESENT, VAR-IF-DEFAULT, TEST-PROGRAM-HEADER, TEST-PROGRAM-BODY) 5 | AC_DEFUN([OPUS_CHECK_INTRINSICS], 6 | [ 7 | AC_MSG_CHECKING([if compiler supports $1 intrinsics]) 8 | AC_LINK_IFELSE( 9 | [AC_LANG_PROGRAM($5, $6)], 10 | [ 11 | $3=1 12 | $4=1 13 | AC_MSG_RESULT([yes]) 14 | ],[ 15 | $4=0 16 | AC_MSG_RESULT([no]) 17 | AC_MSG_CHECKING([if compiler supports $1 intrinsics with $2]) 18 | save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $2" 19 | AC_LINK_IFELSE([AC_LANG_PROGRAM($5, $6)], 20 | [ 21 | AC_MSG_RESULT([yes]) 22 | $3=1 23 | ],[ 24 | AC_MSG_RESULT([no]) 25 | $3=0 26 | ]) 27 | CFLAGS="$save_CFLAGS" 28 | ]) 29 | ]) 30 | -------------------------------------------------------------------------------- /deps/libopus/opus-uninstalled.pc.in: -------------------------------------------------------------------------------- 1 | # Opus codec reference implementation uninstalled pkg-config file 2 | 3 | libdir=${pcfiledir}/.libs 4 | includedir=${pcfiledir} 5 | 6 | Name: opus uninstalled 7 | Description: Opus IETF audio codec (not installed, @PC_BUILD@) 8 | Version: @VERSION@ 9 | Requires: 10 | Conflicts: 11 | Libs: ${libdir}/libopus.la @LIBM@ 12 | Cflags: -I${pcfiledir}/@top_srcdir@/include 13 | -------------------------------------------------------------------------------- /deps/libopus/opus.pc.in: -------------------------------------------------------------------------------- 1 | # Opus codec reference implementation pkg-config file 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: Opus 9 | Description: Opus IETF audio codec (@PC_BUILD@ build) 10 | URL: https://opus-codec.org/ 11 | Version: @VERSION@ 12 | Requires: 13 | Conflicts: 14 | Libs: -L${libdir} -lopus 15 | Libs.private: @LIBM@ 16 | Cflags: -I${includedir}/opus 17 | -------------------------------------------------------------------------------- /deps/libopus/opus_config.cmake: -------------------------------------------------------------------------------- 1 | include(opus_functions.cmake) 2 | 3 | configure_file(config.h.cmake.in config.h @ONLY) 4 | add_definitions(-DHAVE_CONFIG_H) 5 | 6 | set_property(GLOBAL PROPERTY USE_FOLDERS ON) 7 | set_property(GLOBAL PROPERTY C_STANDARD 99) 8 | 9 | if(MSVC) 10 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) 11 | endif() 12 | 13 | include(CheckLibraryExists) 14 | check_library_exists(m floor "" HAVE_LIBM) 15 | if(HAVE_LIBM) 16 | list(APPEND OPUS_REQUIRED_LIBRARIES m) 17 | endif() 18 | 19 | if(CMAKE_SYSTEM_PROCESSOR MATCHES "(i[0-9]86|x86|X86|amd64|AMD64|x86_64)") 20 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 21 | set(OPUS_CPU_X64 1) 22 | else() 23 | set(OPUS_CPU_X86 1) 24 | endif() 25 | elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") 26 | set(OPUS_CPU_ARM 1) 27 | endif() 28 | 29 | opus_supports_cpu_detection(RUNTIME_CPU_CAPABILITY_DETECTION) 30 | 31 | if(OPUS_CPU_X86 OR OPUS_CPU_X64) 32 | opus_detect_sse(COMPILER_SUPPORT_SIMD) 33 | elseif(OPUS_CPU_ARM) 34 | opus_detect_neon(COMPILER_SUPPORT_NEON) 35 | if(COMPILER_SUPPORT_NEON) 36 | option(OPUS_USE_NEON "Option to turn off SSE" ON) 37 | option(OPUS_MAY_SUPPORT_NEON "Does runtime check for neon support" ON) 38 | option(OPUS_PRESUME_NEON "Assume target CPU has NEON support" OFF) 39 | if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") 40 | set(OPUS_PRESUME_NEON ON) 41 | endif() 42 | endif() 43 | endif() 44 | -------------------------------------------------------------------------------- /deps/libopus/opus_headers.mk: -------------------------------------------------------------------------------- 1 | OPUS_HEAD = \ 2 | include/opus.h \ 3 | include/opus_multistream.h \ 4 | include/opus_projection.h \ 5 | src/opus_private.h \ 6 | src/analysis.h \ 7 | src/mapping_matrix.h \ 8 | src/mlp.h \ 9 | src/tansig_table.h 10 | -------------------------------------------------------------------------------- /deps/libopus/opus_sources.cmake: -------------------------------------------------------------------------------- 1 | include(opus_functions.cmake) 2 | 3 | get_opus_sources(SILK_SOURCES silk_sources.mk silk_sources) 4 | get_opus_sources(SILK_SOURCES_FLOAT silk_sources.mk silk_sources_float) 5 | get_opus_sources(SILK_SOURCES_FIXED silk_sources.mk silk_sources_fixed) 6 | get_opus_sources(SILK_SOURCES_SSE4_1 silk_sources.mk silk_sources_sse4_1) 7 | get_opus_sources(SILK_SOURCES_FIXED_SSE4_1 silk_sources.mk 8 | silk_sources_fixed_sse4_1) 9 | get_opus_sources(SILK_SOURCES_ARM_NEON_INTR silk_sources.mk 10 | silk_sources_arm_neon_intr) 11 | get_opus_sources(SILK_SOURCES_FIXED_ARM_NEON_INTR silk_sources.mk 12 | silk_sources_fixed_arm_neon_intr) 13 | 14 | get_opus_sources(OPUS_SOURCES opus_sources.mk opus_sources) 15 | get_opus_sources(OPUS_SOURCES_FLOAT opus_sources.mk opus_sources_float) 16 | 17 | get_opus_sources(CELT_SOURCES celt_sources.mk celt_sources) 18 | get_opus_sources(CELT_SOURCES_SSE celt_sources.mk celt_sources_sse) 19 | get_opus_sources(CELT_SOURCES_SSE2 celt_sources.mk celt_sources_sse2) 20 | get_opus_sources(CELT_SOURCES_SSE4_1 celt_sources.mk celt_sources_sse4_1) 21 | get_opus_sources(CELT_SOURCES_ARM celt_sources.mk celt_sources_arm) 22 | get_opus_sources(CELT_SOURCES_ARM_ASM celt_sources.mk celt_sources_arm_asm) 23 | get_opus_sources(CELT_AM_SOURCES_ARM_ASM celt_sources.mk 24 | celt_am_sources_arm_asm) 25 | get_opus_sources(CELT_SOURCES_ARM_NEON_INTR celt_sources.mk 26 | celt_sources_arm_neon_intr) 27 | get_opus_sources(CELT_SOURCES_ARM_NE10 celt_sources.mk celt_sources_arm_ne10) 28 | 29 | get_opus_sources(opus_demo_SOURCES Makefile.am opus_demo_sources) 30 | get_opus_sources(opus_custom_demo_SOURCES Makefile.am opus_custom_demo_sources) 31 | get_opus_sources(opus_compare_SOURCES Makefile.am opus_compare_sources) 32 | get_opus_sources(tests_test_opus_api_SOURCES Makefile.am test_opus_api_sources) 33 | get_opus_sources(tests_test_opus_encode_SOURCES Makefile.am 34 | test_opus_encode_sources) 35 | get_opus_sources(tests_test_opus_decode_SOURCES Makefile.am 36 | test_opus_decode_sources) 37 | get_opus_sources(tests_test_opus_padding_SOURCES Makefile.am 38 | test_opus_padding_sources) 39 | -------------------------------------------------------------------------------- /deps/libopus/opus_sources.mk: -------------------------------------------------------------------------------- 1 | OPUS_SOURCES = \ 2 | src/opus.c \ 3 | src/opus_decoder.c \ 4 | src/opus_encoder.c \ 5 | src/opus_multistream.c \ 6 | src/opus_multistream_encoder.c \ 7 | src/opus_multistream_decoder.c \ 8 | src/repacketizer.c \ 9 | src/opus_projection_encoder.c \ 10 | src/opus_projection_decoder.c \ 11 | src/mapping_matrix.c 12 | 13 | OPUS_SOURCES_FLOAT = \ 14 | src/analysis.c \ 15 | src/mlp.c \ 16 | src/mlp_data.c 17 | -------------------------------------------------------------------------------- /deps/libopus/package_version: -------------------------------------------------------------------------------- 1 | PACKAGE_VERSION="1.3.1" 2 | -------------------------------------------------------------------------------- /deps/libopus/silk/arm/SigProc_FIX_armv4.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (C) 2013 Xiph.Org Foundation and contributors 3 | Copyright (c) 2013 Parrot 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | - Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | - Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 13 | names of specific contributors, may be used to endorse or promote 14 | products derived from this software without specific prior written 15 | permission. 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | ***********************************************************************/ 28 | 29 | #ifndef SILK_SIGPROC_FIX_ARMv4_H 30 | #define SILK_SIGPROC_FIX_ARMv4_H 31 | 32 | #undef silk_MLA 33 | static OPUS_INLINE opus_int32 silk_MLA_armv4(opus_int32 a, opus_int32 b, 34 | opus_int32 c) 35 | { 36 | opus_int32 res; 37 | __asm__( 38 | "#silk_MLA\n\t" 39 | "mla %0, %1, %2, %3\n\t" 40 | : "=&r"(res) 41 | : "r"(b), "r"(c), "r"(a) 42 | ); 43 | return res; 44 | } 45 | #define silk_MLA(a, b, c) (silk_MLA_armv4(a, b, c)) 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /deps/libopus/silk/arm/macros_arm64.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (C) 2015 Vidyo 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifndef SILK_MACROS_ARM64_H 29 | #define SILK_MACROS_ARM64_H 30 | 31 | #include 32 | 33 | #undef silk_ADD_SAT32 34 | #define silk_ADD_SAT32(a, b) (vqadds_s32((a), (b))) 35 | 36 | #undef silk_SUB_SAT32 37 | #define silk_SUB_SAT32(a, b) (vqsubs_s32((a), (b))) 38 | 39 | #endif /* SILK_MACROS_ARM64_H */ 40 | -------------------------------------------------------------------------------- /deps/libopus/silk/float/bwexpander_FLP.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FLP.h" 33 | 34 | /* Chirp (bw expand) LP AR filter */ 35 | void silk_bwexpander_FLP( 36 | silk_float *ar, /* I/O AR filter to be expanded (without leading 1) */ 37 | const opus_int d, /* I length of ar */ 38 | const silk_float chirp /* I chirp factor (typically in range (0..1) ) */ 39 | ) 40 | { 41 | opus_int i; 42 | silk_float cfac = chirp; 43 | 44 | for( i = 0; i < d - 1; i++ ) { 45 | ar[ i ] *= cfac; 46 | cfac *= chirp; 47 | } 48 | ar[ d - 1 ] *= cfac; 49 | } 50 | -------------------------------------------------------------------------------- /deps/libopus/silk/float/scale_vector_FLP.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FLP.h" 33 | 34 | /* multiply a vector by a constant */ 35 | void silk_scale_vector_FLP( 36 | silk_float *data1, 37 | silk_float gain, 38 | opus_int dataSize 39 | ) 40 | { 41 | opus_int i, dataSize4; 42 | 43 | /* 4x unrolled loop */ 44 | dataSize4 = dataSize & 0xFFFC; 45 | for( i = 0; i < dataSize4; i += 4 ) { 46 | data1[ i + 0 ] *= gain; 47 | data1[ i + 1 ] *= gain; 48 | data1[ i + 2 ] *= gain; 49 | data1[ i + 3 ] *= gain; 50 | } 51 | 52 | /* any remaining elements */ 53 | for( ; i < dataSize; i++ ) { 54 | data1[ i ] *= gain; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /deps/libopus/silk/lin2log.c: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #include "SigProc_FIX.h" 33 | /* Approximation of 128 * log2() (very close inverse of silk_log2lin()) */ 34 | /* Convert input to a log scale */ 35 | opus_int32 silk_lin2log( 36 | const opus_int32 inLin /* I input in linear scale */ 37 | ) 38 | { 39 | opus_int32 lz, frac_Q7; 40 | 41 | silk_CLZ_FRAC( inLin, &lz, &frac_Q7 ); 42 | 43 | /* Piece-wise parabolic approximation */ 44 | return silk_ADD_LSHIFT32( silk_SMLAWB( frac_Q7, silk_MUL( frac_Q7, 128 - frac_Q7 ), 179 ), 31 - lz, 7 ); 45 | } 46 | 47 | -------------------------------------------------------------------------------- /deps/libopus/silk/mips/sigproc_fix_mipsr1.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | - Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 12 | names of specific contributors, may be used to endorse or promote 13 | products derived from this software without specific prior written 14 | permission. 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | ***********************************************************************/ 27 | 28 | #ifndef SILK_SIGPROC_FIX_MIPSR1_H 29 | #define SILK_SIGPROC_FIX_MIPSR1_H 30 | 31 | #undef silk_SAT16 32 | static inline short int silk_SAT16(int a) 33 | { 34 | int c; 35 | c = __builtin_mips_shll_s_w(a, 16); 36 | c = c>>16; 37 | 38 | return c; 39 | } 40 | 41 | #undef silk_LSHIFT_SAT32 42 | static inline int silk_LSHIFT_SAT32(int a, int shift) 43 | { 44 | int r; 45 | 46 | r = __builtin_mips_shll_s_w(a, shift); 47 | 48 | return r; 49 | } 50 | 51 | #undef silk_RSHIFT_ROUND 52 | static inline int silk_RSHIFT_ROUND(int a, int shift) 53 | { 54 | int r; 55 | 56 | r = __builtin_mips_shra_r_w(a, shift); 57 | return r; 58 | } 59 | 60 | #endif /* SILK_SIGPROC_FIX_MIPSR1_H */ 61 | -------------------------------------------------------------------------------- /deps/libopus/silk_headers.mk: -------------------------------------------------------------------------------- 1 | SILK_HEAD = \ 2 | silk/debug.h \ 3 | silk/control.h \ 4 | silk/errors.h \ 5 | silk/API.h \ 6 | silk/typedef.h \ 7 | silk/define.h \ 8 | silk/main.h \ 9 | silk/x86/main_sse.h \ 10 | silk/PLC.h \ 11 | silk/structs.h \ 12 | silk/tables.h \ 13 | silk/tuning_parameters.h \ 14 | silk/Inlines.h \ 15 | silk/MacroCount.h \ 16 | silk/MacroDebug.h \ 17 | silk/macros.h \ 18 | silk/NSQ.h \ 19 | silk/pitch_est_defines.h \ 20 | silk/resampler_private.h \ 21 | silk/resampler_rom.h \ 22 | silk/resampler_structs.h \ 23 | silk/SigProc_FIX.h \ 24 | silk/x86/SigProc_FIX_sse.h \ 25 | silk/arm/biquad_alt_arm.h \ 26 | silk/arm/LPC_inv_pred_gain_arm.h \ 27 | silk/arm/macros_armv4.h \ 28 | silk/arm/macros_armv5e.h \ 29 | silk/arm/macros_arm64.h \ 30 | silk/arm/SigProc_FIX_armv4.h \ 31 | silk/arm/SigProc_FIX_armv5e.h \ 32 | silk/arm/NSQ_del_dec_arm.h \ 33 | silk/arm/NSQ_neon.h \ 34 | silk/fixed/main_FIX.h \ 35 | silk/fixed/structs_FIX.h \ 36 | silk/fixed/arm/warped_autocorrelation_FIX_arm.h \ 37 | silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h \ 38 | silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h \ 39 | silk/float/main_FLP.h \ 40 | silk/float/structs_FLP.h \ 41 | silk/float/SigProc_FLP.h \ 42 | silk/mips/macros_mipsr1.h \ 43 | silk/mips/NSQ_del_dec_mipsr1.h \ 44 | silk/mips/sigproc_fix_mipsr1.h 45 | -------------------------------------------------------------------------------- /deps/libopus/src/mlp.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2017 Jean-Marc Valin */ 2 | /* 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 18 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 21 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #ifndef _MLP_H_ 28 | #define _MLP_H_ 29 | 30 | #include "opus_types.h" 31 | 32 | #define WEIGHTS_SCALE (1.f/128) 33 | 34 | #define MAX_NEURONS 32 35 | 36 | typedef struct { 37 | const opus_int8 *bias; 38 | const opus_int8 *input_weights; 39 | int nb_inputs; 40 | int nb_neurons; 41 | int sigmoid; 42 | } DenseLayer; 43 | 44 | typedef struct { 45 | const opus_int8 *bias; 46 | const opus_int8 *input_weights; 47 | const opus_int8 *recurrent_weights; 48 | int nb_inputs; 49 | int nb_neurons; 50 | } GRULayer; 51 | 52 | extern const DenseLayer layer0; 53 | extern const GRULayer layer1; 54 | extern const DenseLayer layer2; 55 | 56 | void compute_dense(const DenseLayer *layer, float *output, const float *input); 57 | 58 | void compute_gru(const GRULayer *gru, float *state, const float *input); 59 | 60 | #endif /* _MLP_H_ */ 61 | -------------------------------------------------------------------------------- /deps/libopus/src/tansig_table.h: -------------------------------------------------------------------------------- 1 | /* This file is auto-generated by gen_tables */ 2 | 3 | static const float tansig_table[201] = { 4 | 0.000000f, 0.039979f, 0.079830f, 0.119427f, 0.158649f, 5 | 0.197375f, 0.235496f, 0.272905f, 0.309507f, 0.345214f, 6 | 0.379949f, 0.413644f, 0.446244f, 0.477700f, 0.507977f, 7 | 0.537050f, 0.564900f, 0.591519f, 0.616909f, 0.641077f, 8 | 0.664037f, 0.685809f, 0.706419f, 0.725897f, 0.744277f, 9 | 0.761594f, 0.777888f, 0.793199f, 0.807569f, 0.821040f, 10 | 0.833655f, 0.845456f, 0.856485f, 0.866784f, 0.876393f, 11 | 0.885352f, 0.893698f, 0.901468f, 0.908698f, 0.915420f, 12 | 0.921669f, 0.927473f, 0.932862f, 0.937863f, 0.942503f, 13 | 0.946806f, 0.950795f, 0.954492f, 0.957917f, 0.961090f, 14 | 0.964028f, 0.966747f, 0.969265f, 0.971594f, 0.973749f, 15 | 0.975743f, 0.977587f, 0.979293f, 0.980869f, 0.982327f, 16 | 0.983675f, 0.984921f, 0.986072f, 0.987136f, 0.988119f, 17 | 0.989027f, 0.989867f, 0.990642f, 0.991359f, 0.992020f, 18 | 0.992631f, 0.993196f, 0.993718f, 0.994199f, 0.994644f, 19 | 0.995055f, 0.995434f, 0.995784f, 0.996108f, 0.996407f, 20 | 0.996682f, 0.996937f, 0.997172f, 0.997389f, 0.997590f, 21 | 0.997775f, 0.997946f, 0.998104f, 0.998249f, 0.998384f, 22 | 0.998508f, 0.998623f, 0.998728f, 0.998826f, 0.998916f, 23 | 0.999000f, 0.999076f, 0.999147f, 0.999213f, 0.999273f, 24 | 0.999329f, 0.999381f, 0.999428f, 0.999472f, 0.999513f, 25 | 0.999550f, 0.999585f, 0.999617f, 0.999646f, 0.999673f, 26 | 0.999699f, 0.999722f, 0.999743f, 0.999763f, 0.999781f, 27 | 0.999798f, 0.999813f, 0.999828f, 0.999841f, 0.999853f, 28 | 0.999865f, 0.999875f, 0.999885f, 0.999893f, 0.999902f, 29 | 0.999909f, 0.999916f, 0.999923f, 0.999929f, 0.999934f, 30 | 0.999939f, 0.999944f, 0.999948f, 0.999952f, 0.999956f, 31 | 0.999959f, 0.999962f, 0.999965f, 0.999968f, 0.999970f, 32 | 0.999973f, 0.999975f, 0.999977f, 0.999978f, 0.999980f, 33 | 0.999982f, 0.999983f, 0.999984f, 0.999986f, 0.999987f, 34 | 0.999988f, 0.999989f, 0.999990f, 0.999990f, 0.999991f, 35 | 0.999992f, 0.999992f, 0.999993f, 0.999994f, 0.999994f, 36 | 0.999994f, 0.999995f, 0.999995f, 0.999996f, 0.999996f, 37 | 0.999996f, 0.999997f, 0.999997f, 0.999997f, 0.999997f, 38 | 0.999997f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, 39 | 0.999998f, 0.999998f, 0.999999f, 0.999999f, 0.999999f, 40 | 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 41 | 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 42 | 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 43 | 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 44 | 1.000000f, 45 | }; 46 | -------------------------------------------------------------------------------- /deps/libopus/win32/VS2015/opus_demo.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /deps/libopus/win32/VS2015/test_opus_api.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | -------------------------------------------------------------------------------- /deps/libopus/win32/VS2015/test_opus_decode.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4a0dd677-931f-4728-afe5-b761149fc7eb} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | -------------------------------------------------------------------------------- /deps/libopus/win32/VS2015/test_opus_encode.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {546c8d9a-103e-4f78-972b-b44e8d3c8aba} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | Source Files 15 | 16 | 17 | -------------------------------------------------------------------------------- /deps/libopus/win32/genversion.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | setlocal enableextensions enabledelayedexpansion 4 | 5 | for /f %%v in ('cd "%~dp0.." ^&^& git status ^>NUL 2^>NUL ^&^& git describe --tags --match "v*" --dirty 2^>NUL') do set version=%%v 6 | 7 | if not "%version%"=="" set version=!version:~1! && goto :gotversion 8 | 9 | if exist "%~dp0..\package_version" goto :getversion 10 | 11 | echo Git cannot be found, nor can package_version. Generating unknown version. 12 | 13 | set version=unknown 14 | 15 | goto :gotversion 16 | 17 | :getversion 18 | 19 | for /f "delims== tokens=2" %%v in (%~dps0..\package_version) do set version=%%v 20 | set version=!version:"=! 21 | 22 | :gotversion 23 | 24 | set version=!version: =! 25 | set version_out=#define %~2 "%version%" 26 | 27 | echo %version_out%> "%~1_temp" 28 | 29 | echo n | comp "%~1_temp" "%~1" > NUL 2> NUL 30 | 31 | if not errorlevel 1 goto exit 32 | 33 | copy /y "%~1_temp" "%~1" 34 | 35 | :exit 36 | 37 | del "%~1_temp" 38 | -------------------------------------------------------------------------------- /dist/OggOpusToRtp.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Transform, TransformCallback } from 'stream'; 3 | export interface OggOpusToRtpOptions { 4 | payloadType?: number; 5 | sampleRate?: number; 6 | objectMode?: boolean; 7 | } 8 | export declare class OggOpusToRtp extends Transform { 9 | private _transformer; 10 | constructor(options?: OggOpusToRtpOptions); 11 | _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; 12 | } 13 | export default OggOpusToRtp; 14 | -------------------------------------------------------------------------------- /dist/OggOpusToRtp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.OggOpusToRtp = void 0; 7 | const debug_1 = __importDefault(require("debug")); 8 | const stream_1 = require("stream"); 9 | const bindings_1 = __importDefault(require("bindings")); 10 | const { OggOpusToRtp: OggOpusToRtpNative } = (0, bindings_1.default)('rtpoggopus'); 11 | const debug = (0, debug_1.default)('rtp-ogg-opus:*'); 12 | class OggOpusToRtp extends stream_1.Transform { 13 | constructor(options) { 14 | var _a; 15 | super({ objectMode: (_a = options === null || options === void 0 ? void 0 : options.objectMode) !== null && _a !== void 0 ? _a : false }); 16 | const { payloadType, sampleRate, objectMode } = Object.assign({ payloadType: 120, sampleRate: 48000, objectMode: false }, options); 17 | this._transformer = new OggOpusToRtpNative(payloadType, sampleRate, objectMode); 18 | } 19 | _transform(chunk, encoding, callback) { 20 | try { 21 | this._transformer.transform(chunk, callback, this); 22 | } 23 | catch (err) { 24 | debug('OggOpusToRtp error', err); 25 | } 26 | } 27 | } 28 | exports.OggOpusToRtp = OggOpusToRtp; 29 | exports.default = OggOpusToRtp; 30 | -------------------------------------------------------------------------------- /dist/RtpDecoder.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Transform, TransformCallback } from 'stream'; 3 | export interface RtpDecoderOptions { 4 | objectMode?: boolean; 5 | } 6 | export declare class RtpDecoder extends Transform { 7 | private _decoder; 8 | constructor(options?: RtpDecoderOptions); 9 | _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; 10 | } 11 | export default RtpDecoder; 12 | -------------------------------------------------------------------------------- /dist/RtpDecoder.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.RtpDecoder = void 0; 7 | const debug_1 = __importDefault(require("debug")); 8 | const stream_1 = require("stream"); 9 | const bindings_1 = __importDefault(require("bindings")); 10 | const { RtpDecoder: RtpDecoderNative } = (0, bindings_1.default)('rtpoggopus'); 11 | const debug = (0, debug_1.default)('rtp-ogg-opus:*'); 12 | class RtpDecoder extends stream_1.Transform { 13 | constructor(options) { 14 | var _a, _b; 15 | super({ objectMode: (_a = options === null || options === void 0 ? void 0 : options.objectMode) !== null && _a !== void 0 ? _a : false }); 16 | this._decoder = new RtpDecoderNative((_b = options === null || options === void 0 ? void 0 : options.objectMode) !== null && _b !== void 0 ? _b : false); 17 | } 18 | _transform(chunk, encoding, callback) { 19 | try { 20 | this._decoder.transform(chunk, callback); 21 | } 22 | catch (err) { 23 | debug('RtpDecoder error', err); 24 | } 25 | } 26 | } 27 | exports.RtpDecoder = RtpDecoder; 28 | exports.default = RtpDecoder; 29 | -------------------------------------------------------------------------------- /dist/RtpEncoder.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Transform, TransformCallback } from 'stream'; 3 | export interface RtpEncoderOptions { 4 | payloadType?: number; 5 | samples?: number; 6 | objectMode?: boolean; 7 | } 8 | export declare class RtpEncoder extends Transform { 9 | private _encoder; 10 | constructor(options?: RtpEncoderOptions); 11 | _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; 12 | } 13 | export default RtpEncoder; 14 | -------------------------------------------------------------------------------- /dist/RtpEncoder.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.RtpEncoder = void 0; 7 | const debug_1 = __importDefault(require("debug")); 8 | const stream_1 = require("stream"); 9 | const bindings_1 = __importDefault(require("bindings")); 10 | const { RtpEncoder: RtpEncoderNative } = (0, bindings_1.default)('rtpoggopus'); 11 | const debug = (0, debug_1.default)('rtp-ogg-opus:*'); 12 | class RtpEncoder extends stream_1.Transform { 13 | constructor(options) { 14 | var _a; 15 | super({ objectMode: (_a = options === null || options === void 0 ? void 0 : options.objectMode) !== null && _a !== void 0 ? _a : false }); 16 | const { payloadType, samples, objectMode } = Object.assign({ payloadType: 120, samples: 160, objectMode: false }, options); 17 | this._encoder = new RtpEncoderNative(payloadType, samples, objectMode); 18 | } 19 | _transform(chunk, encoding, callback) { 20 | try { 21 | this._encoder.transform(chunk, callback); 22 | } 23 | catch (err) { 24 | debug('RtpEncoder error', err); 25 | } 26 | } 27 | } 28 | exports.RtpEncoder = RtpEncoder; 29 | exports.default = RtpEncoder; 30 | -------------------------------------------------------------------------------- /dist/RtpOpusToPcm.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Transform, TransformCallback } from 'stream'; 3 | export interface RtpOpusToPcmOptions { 4 | sampleRate?: number; 5 | channels?: number; 6 | } 7 | export declare class RtpOpusToPcm extends Transform { 8 | private _transformer; 9 | constructor(options?: RtpOpusToPcmOptions); 10 | _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; 11 | } 12 | export default RtpOpusToPcm; 13 | -------------------------------------------------------------------------------- /dist/RtpOpusToPcm.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.RtpOpusToPcm = void 0; 7 | const debug_1 = __importDefault(require("debug")); 8 | const stream_1 = require("stream"); 9 | const bindings_1 = __importDefault(require("bindings")); 10 | const { RtpOpusToPcm: RtpOpusToPcmNative } = (0, bindings_1.default)('rtpoggopus'); 11 | const debug = (0, debug_1.default)('rtp-ogg-opus:*'); 12 | class RtpOpusToPcm extends stream_1.Transform { 13 | constructor(options) { 14 | super(); 15 | const { sampleRate, channels } = Object.assign({ sampleRate: 48000, channels: 2 }, options); 16 | this._transformer = new RtpOpusToPcmNative(sampleRate, channels); 17 | } 18 | _transform(chunk, encoding, callback) { 19 | try { 20 | this._transformer.transform(chunk, callback); 21 | } 22 | catch (err) { 23 | debug('RtpOpusToPcm error', err); 24 | } 25 | } 26 | } 27 | exports.RtpOpusToPcm = RtpOpusToPcm; 28 | exports.default = RtpOpusToPcm; 29 | -------------------------------------------------------------------------------- /dist/RtpToOggOpus.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Transform, TransformCallback } from 'stream'; 3 | export interface RtpToOggOpusOptions { 4 | sampleRate?: number; 5 | channels?: number; 6 | objectMode?: boolean; 7 | } 8 | export declare class RtpToOggOpus extends Transform { 9 | private _transformer; 10 | constructor(options?: RtpToOggOpusOptions); 11 | _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; 12 | } 13 | export default RtpToOggOpus; 14 | -------------------------------------------------------------------------------- /dist/RtpToOggOpus.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.RtpToOggOpus = void 0; 7 | const debug_1 = __importDefault(require("debug")); 8 | const stream_1 = require("stream"); 9 | const bindings_1 = __importDefault(require("bindings")); 10 | const { RtpToOggOpus: RtpToOggOpusNative } = (0, bindings_1.default)('rtpoggopus'); 11 | const debug = (0, debug_1.default)('rtp-ogg-opus:*'); 12 | class RtpToOggOpus extends stream_1.Transform { 13 | constructor(options) { 14 | var _a; 15 | super({ objectMode: (_a = options === null || options === void 0 ? void 0 : options.objectMode) !== null && _a !== void 0 ? _a : false }); 16 | const { sampleRate, channels, objectMode } = Object.assign({ sampleRate: 48000, channels: 2, objectMode: false }, options); 17 | this._transformer = new RtpToOggOpusNative(sampleRate, channels, objectMode); 18 | } 19 | _transform(chunk, encoding, callback) { 20 | try { 21 | this._transformer.transform(chunk, callback); 22 | } 23 | catch (err) { 24 | debug('RtpToOggOpus error', err); 25 | } 26 | } 27 | } 28 | exports.RtpToOggOpus = RtpToOggOpus; 29 | exports.default = RtpToOggOpus; 30 | -------------------------------------------------------------------------------- /dist/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as OggOpusToRtp } from './OggOpusToRtp'; 2 | export { default as RtpToOggOpus } from './RtpToOggOpus'; 3 | export { default as RtpDecoder } from './RtpDecoder'; 4 | export { default as RtpEncoder } from './RtpEncoder'; 5 | export { default as RtpOpusToPcm } from './RtpOpusToPcm'; 6 | -------------------------------------------------------------------------------- /dist/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.RtpOpusToPcm = exports.RtpEncoder = exports.RtpDecoder = exports.RtpToOggOpus = exports.OggOpusToRtp = void 0; 7 | var OggOpusToRtp_1 = require("./OggOpusToRtp"); 8 | Object.defineProperty(exports, "OggOpusToRtp", { enumerable: true, get: function () { return __importDefault(OggOpusToRtp_1).default; } }); 9 | var RtpToOggOpus_1 = require("./RtpToOggOpus"); 10 | Object.defineProperty(exports, "RtpToOggOpus", { enumerable: true, get: function () { return __importDefault(RtpToOggOpus_1).default; } }); 11 | var RtpDecoder_1 = require("./RtpDecoder"); 12 | Object.defineProperty(exports, "RtpDecoder", { enumerable: true, get: function () { return __importDefault(RtpDecoder_1).default; } }); 13 | var RtpEncoder_1 = require("./RtpEncoder"); 14 | Object.defineProperty(exports, "RtpEncoder", { enumerable: true, get: function () { return __importDefault(RtpEncoder_1).default; } }); 15 | var RtpOpusToPcm_1 = require("./RtpOpusToPcm"); 16 | Object.defineProperty(exports, "RtpOpusToPcm", { enumerable: true, get: function () { return __importDefault(RtpOpusToPcm_1).default; } }); 17 | -------------------------------------------------------------------------------- /jestconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "roots": [""], 3 | "transform": { 4 | "^.+\\.(t|j)sx?$": "ts-jest" 5 | }, 6 | "testRegex": "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", 7 | "testPathIgnorePatterns": ["/tests/utils/"], 8 | "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"] 9 | } 10 | -------------------------------------------------------------------------------- /lib/OggOpusToRtp.ts: -------------------------------------------------------------------------------- 1 | import Debug from 'debug'; 2 | import { Transform, TransformCallback } from 'stream'; 3 | import bindings from 'bindings'; 4 | 5 | const { OggOpusToRtp: OggOpusToRtpNative } = bindings('rtpoggopus'); 6 | const debug = Debug('rtp-ogg-opus:*'); 7 | 8 | export interface OggOpusToRtpOptions { 9 | payloadType?: number; 10 | sampleRate?: number; 11 | objectMode?: boolean; 12 | } 13 | 14 | export class OggOpusToRtp extends Transform { 15 | private _transformer: typeof OggOpusToRtpNative; 16 | 17 | constructor(options?: OggOpusToRtpOptions) { 18 | super({ objectMode: options?.objectMode ?? false }); 19 | const { payloadType, sampleRate, objectMode } = { 20 | payloadType: 120, 21 | sampleRate: 48000, 22 | objectMode: false, 23 | ...options, 24 | }; 25 | this._transformer = new OggOpusToRtpNative(payloadType, sampleRate, objectMode); 26 | } 27 | 28 | _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void { 29 | try { 30 | this._transformer.transform(chunk, callback, this); 31 | } catch (err) { 32 | debug('OggOpusToRtp error', err); 33 | } 34 | } 35 | } 36 | 37 | export default OggOpusToRtp; 38 | -------------------------------------------------------------------------------- /lib/RtpDecoder.ts: -------------------------------------------------------------------------------- 1 | import Debug from 'debug'; 2 | import { Transform, TransformCallback } from 'stream'; 3 | import bindings from 'bindings'; 4 | 5 | const { RtpDecoder: RtpDecoderNative } = bindings('rtpoggopus'); 6 | const debug = Debug('rtp-ogg-opus:*'); 7 | 8 | export interface RtpDecoderOptions { 9 | objectMode?: boolean; 10 | } 11 | 12 | export class RtpDecoder extends Transform { 13 | private _decoder: typeof RtpDecoderNative; 14 | 15 | constructor(options?: RtpDecoderOptions) { 16 | super({ objectMode: options?.objectMode ?? false }); 17 | this._decoder = new RtpDecoderNative(options?.objectMode ?? false); 18 | } 19 | 20 | _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void { 21 | try { 22 | this._decoder.transform(chunk, callback); 23 | } catch (err) { 24 | debug('RtpDecoder error', err); 25 | } 26 | } 27 | } 28 | 29 | export default RtpDecoder; 30 | -------------------------------------------------------------------------------- /lib/RtpEncoder.ts: -------------------------------------------------------------------------------- 1 | import Debug from 'debug'; 2 | import { Transform, TransformCallback } from 'stream'; 3 | import bindings from 'bindings'; 4 | 5 | const { RtpEncoder: RtpEncoderNative } = bindings('rtpoggopus'); 6 | const debug = Debug('rtp-ogg-opus:*'); 7 | 8 | export interface RtpEncoderOptions { 9 | payloadType?: number; 10 | samples?: number; 11 | objectMode?: boolean; 12 | } 13 | 14 | export class RtpEncoder extends Transform { 15 | private _encoder: typeof RtpEncoderNative; 16 | 17 | constructor(options?: RtpEncoderOptions) { 18 | super({ objectMode: options?.objectMode ?? false }); 19 | const { payloadType, samples, objectMode } = { 20 | payloadType: 120, 21 | samples: 160, 22 | objectMode: false, 23 | ...options, 24 | }; 25 | this._encoder = new RtpEncoderNative(payloadType, samples, objectMode); 26 | } 27 | 28 | _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void { 29 | try { 30 | this._encoder.transform(chunk, callback); 31 | } catch (err) { 32 | debug('RtpEncoder error', err); 33 | } 34 | } 35 | } 36 | 37 | export default RtpEncoder; 38 | -------------------------------------------------------------------------------- /lib/RtpOpusToPcm.ts: -------------------------------------------------------------------------------- 1 | import Debug from 'debug'; 2 | import { Transform, TransformCallback } from 'stream'; 3 | import bindings from 'bindings'; 4 | 5 | const { RtpOpusToPcm: RtpOpusToPcmNative } = bindings('rtpoggopus'); 6 | const debug = Debug('rtp-ogg-opus:*'); 7 | 8 | export interface RtpOpusToPcmOptions { 9 | sampleRate?: number; 10 | channels?: number; 11 | } 12 | 13 | export class RtpOpusToPcm extends Transform { 14 | private _transformer: typeof RtpOpusToPcmNative; 15 | 16 | constructor(options?: RtpOpusToPcmOptions) { 17 | super(); 18 | const { sampleRate, channels } = { sampleRate: 48000, channels: 2, ...options }; 19 | this._transformer = new RtpOpusToPcmNative(sampleRate, channels); 20 | } 21 | 22 | _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void { 23 | try { 24 | this._transformer.transform(chunk, callback); 25 | } catch (err) { 26 | debug('RtpOpusToPcm error', err); 27 | } 28 | } 29 | } 30 | 31 | export default RtpOpusToPcm; 32 | -------------------------------------------------------------------------------- /lib/RtpToOggOpus.ts: -------------------------------------------------------------------------------- 1 | import Debug from 'debug'; 2 | import { Transform, TransformCallback } from 'stream'; 3 | import bindings from 'bindings'; 4 | 5 | const { RtpToOggOpus: RtpToOggOpusNative } = bindings('rtpoggopus'); 6 | const debug = Debug('rtp-ogg-opus:*'); 7 | 8 | export interface RtpToOggOpusOptions { 9 | sampleRate?: number; 10 | channels?: number; 11 | objectMode?: boolean; 12 | } 13 | 14 | export class RtpToOggOpus extends Transform { 15 | private _transformer: typeof RtpToOggOpusNative; 16 | 17 | constructor(options?: RtpToOggOpusOptions) { 18 | super({ objectMode: options?.objectMode ?? false }); 19 | const { sampleRate, channels, objectMode } = { sampleRate: 48000, channels: 2, objectMode: false, ...options }; 20 | this._transformer = new RtpToOggOpusNative(sampleRate, channels, objectMode); 21 | } 22 | 23 | _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void { 24 | try { 25 | this._transformer.transform(chunk, callback); 26 | } catch (err) { 27 | debug('RtpToOggOpus error', err); 28 | } 29 | } 30 | } 31 | 32 | export default RtpToOggOpus; 33 | -------------------------------------------------------------------------------- /lib/binding/napi-v3/oggopus.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/lib/binding/napi-v3/oggopus.exp -------------------------------------------------------------------------------- /lib/binding/napi-v3/oggopus.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/lib/binding/napi-v3/oggopus.ilk -------------------------------------------------------------------------------- /lib/binding/napi-v3/oggopus.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/lib/binding/napi-v3/oggopus.lib -------------------------------------------------------------------------------- /lib/binding/napi-v3/oggopus.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/lib/binding/napi-v3/oggopus.node -------------------------------------------------------------------------------- /lib/index.ts: -------------------------------------------------------------------------------- 1 | export { default as OggOpusToRtp } from './OggOpusToRtp'; 2 | export { default as RtpToOggOpus } from './RtpToOggOpus'; 3 | export { default as RtpDecoder } from './RtpDecoder'; 4 | export { default as RtpEncoder } from './RtpEncoder'; 5 | export { default as RtpOpusToPcm } from './RtpOpusToPcm'; 6 | -------------------------------------------------------------------------------- /src/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "rtp_decoder.h" 4 | #include "rtp_encoder.h" 5 | #include "ogg_opus_to_rtp.h" 6 | #include "rtp_to_ogg_opus.h" 7 | #include "rtp_opus_to_pcm.h" 8 | 9 | Napi::Object InitAll(Napi::Env env, Napi::Object exports) 10 | { 11 | RtpDecoder::Init(env, exports); 12 | RtpEncoder::Init(env, exports); 13 | OggOpusToRtp::Init(env, exports); 14 | RtpToOggOpus::Init(env, exports); 15 | return RtpOpusToPcm::Init(env, exports); 16 | } 17 | 18 | NODE_API_MODULE(NODE_GYP_MODULE_NAME, InitAll) 19 | -------------------------------------------------------------------------------- /src/ogg_opus_to_rtp.h: -------------------------------------------------------------------------------- 1 | #ifndef OGG_OPUS_TO_RTP_H 2 | #define OGG_OPUS_TO_RTP_H 3 | 4 | #include 5 | #include "helpers.h" 6 | #include "../deps/libopus/include/opus.h" 7 | #include "../deps/libogg/include/ogg/ogg.h" 8 | 9 | class OggOpusToRtp : public Napi::ObjectWrap 10 | { 11 | 12 | public: 13 | static Napi::Object Init(Napi::Env env, Napi::Object exports); 14 | 15 | OggOpusToRtp(const Napi::CallbackInfo &info); 16 | ~OggOpusToRtp(); 17 | 18 | void Transform(const Napi::CallbackInfo &info); 19 | 20 | private: 21 | static Napi::FunctionReference constructor; 22 | bool objectMode = false; 23 | 24 | int sampleRate = 48000; 25 | rtp_header rtp; 26 | 27 | ogg_sync_state ostate; 28 | ogg_stream_state ostream; 29 | int headers = 0; 30 | int serialno = 0; 31 | 32 | int pending = 0; 33 | }; 34 | 35 | #endif -------------------------------------------------------------------------------- /src/rtp_decoder.h: -------------------------------------------------------------------------------- 1 | #ifndef RTP_DECODER_H 2 | #define RTP_DECODER_H 3 | 4 | #include 5 | 6 | class RtpDecoder : public Napi::ObjectWrap 7 | { 8 | 9 | public: 10 | static Napi::Object Init(Napi::Env env, Napi::Object exports); 11 | 12 | RtpDecoder(const Napi::CallbackInfo &info); 13 | ~RtpDecoder(); 14 | 15 | void Transform(const Napi::CallbackInfo &info); 16 | 17 | private: 18 | static Napi::FunctionReference constructor; 19 | 20 | bool objectMode = false; 21 | }; 22 | 23 | #endif -------------------------------------------------------------------------------- /src/rtp_encoder.h: -------------------------------------------------------------------------------- 1 | #ifndef RTP_ENCODER_H 2 | #define RTP_ENCODER_H 3 | 4 | #include 5 | #include "helpers.h" 6 | 7 | class RtpEncoder : public Napi::ObjectWrap 8 | { 9 | 10 | public: 11 | static Napi::Object Init(Napi::Env env, Napi::Object exports); 12 | 13 | RtpEncoder(const Napi::CallbackInfo &info); 14 | ~RtpEncoder(); 15 | 16 | void Transform(const Napi::CallbackInfo &info); 17 | 18 | private: 19 | static Napi::FunctionReference constructor; 20 | 21 | bool objectMode = false; 22 | 23 | int samples; 24 | rtp_header rtp; 25 | }; 26 | 27 | #endif -------------------------------------------------------------------------------- /src/rtp_opus_to_pcm.h: -------------------------------------------------------------------------------- 1 | #ifndef RTP_OPUS_TO_PCM_H 2 | #define RTP_OPUS_TO_PCM_H 3 | 4 | #define FRAME_SIZE 960 5 | #define MAX_FRAME_SIZE 6 * 960 6 | #define MAX_PACKET_SIZE 3 * 1276 7 | #define BITRATE 64000 8 | 9 | #include 10 | #include "helpers.h" 11 | #include "../deps/libopus/include/opus.h" 12 | 13 | class RtpOpusToPcm : public Napi::ObjectWrap 14 | { 15 | 16 | public: 17 | static Napi::Object Init(Napi::Env env, Napi::Object exports); 18 | 19 | RtpOpusToPcm(const Napi::CallbackInfo &info); 20 | ~RtpOpusToPcm(); 21 | 22 | void Transform(const Napi::CallbackInfo &info); 23 | 24 | private: 25 | static Napi::FunctionReference constructor; 26 | 27 | OpusDecoder *decoder; 28 | opus_int16 *outPcm; 29 | 30 | int channels = 2; 31 | int sampleRate = 48000; 32 | 33 | Napi::Value GetChannels(const Napi::CallbackInfo &info); 34 | Napi::Value GetSampleRate(const Napi::CallbackInfo &info); 35 | }; 36 | 37 | #endif -------------------------------------------------------------------------------- /src/rtp_to_ogg_opus.h: -------------------------------------------------------------------------------- 1 | #ifndef RTP_TO_OGG_OPUS_H 2 | #define RTP_TO_OGG_OPUS_H 3 | 4 | #include 5 | #include "helpers.h" 6 | // #include "speex_resampler.h" 7 | #include "../deps/libopus/include/opus.h" 8 | #include "../deps/libogg/include/ogg/ogg.h" 9 | 10 | class RtpToOggOpus : public Napi::ObjectWrap 11 | { 12 | 13 | public: 14 | static Napi::Object Init(Napi::Env env, Napi::Object exports); 15 | 16 | RtpToOggOpus(const Napi::CallbackInfo &info); 17 | ~RtpToOggOpus(); 18 | 19 | void Transform(const Napi::CallbackInfo &info); 20 | 21 | private: 22 | static Napi::FunctionReference constructor; 23 | 24 | bool objectMode = false; 25 | 26 | int channels = 2; 27 | int sampleRate = 48000; 28 | 29 | int pages = 0; 30 | int headerPages = 0; 31 | bool pending = false; 32 | 33 | ogg_stream_state *stream; 34 | ogg_packet *head; 35 | ogg_packet *tags; 36 | 37 | ogg_int64_t granulepos; 38 | 39 | unsigned char *buffer; 40 | size_t bufferSize; 41 | size_t bufferOffset; 42 | 43 | // void SetChannels(const Napi::CallbackInfo &info, const Napi::Value &value); 44 | Napi::Value GetChannels(const Napi::CallbackInfo &info); 45 | 46 | // void SetSampleRate(const Napi::CallbackInfo &info, const Napi::Value &value); 47 | Napi::Value GetSampleRate(const Napi::CallbackInfo &info); 48 | }; 49 | 50 | #endif -------------------------------------------------------------------------------- /tests/RtpDecoder.test.ts: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | // import { v4 as uuid } from 'uuid'; 3 | // import Debug from 'debug'; 4 | import fs from 'fs'; 5 | import path from 'path'; 6 | 7 | import { RtpDecoder } from '../lib'; 8 | 9 | // const debug = Debug('rtp-ogg-opus:*'); 10 | const attrs = ['version', 'payloadType', 'pad', 'ext', 'cc', 'mark', 'seq', 'time', 'ssrc', 'headerSize', 'payload']; 11 | const testFile = path.join(__dirname, 'utils/rtppacket.dat'); 12 | 13 | describe('RtpDecoder', () => { 14 | let fileStream: fs.ReadStream; 15 | 16 | beforeEach(async () => { 17 | try { 18 | fileStream = fs.createReadStream(testFile); 19 | } catch (err) { 20 | console.error(err); 21 | } 22 | }); 23 | 24 | // afterEach(async () => {}); 25 | 26 | it('should return a buffer (default mode)', done => { 27 | const decoder = new RtpDecoder(); 28 | 29 | decoder.on('data', (data: any) => { 30 | expect(Buffer.isBuffer(data)).toBe(true); 31 | 32 | done(); 33 | }); 34 | 35 | fileStream.pipe(decoder); 36 | }); 37 | 38 | it('should return a valid object (objectMode: true)', done => { 39 | const decoder = new RtpDecoder({ objectMode: true }); 40 | 41 | decoder.on('data', (obj: any) => { 42 | for (const key of attrs) { 43 | expect(_.has(obj, key)).toBeTruthy(); 44 | } 45 | 46 | expect(obj.version).toBe(2); 47 | 48 | expect(Buffer.isBuffer(obj.payload)).toBeTruthy(); 49 | 50 | done(); 51 | }); 52 | 53 | fileStream.pipe(decoder); 54 | }); 55 | }); 56 | -------------------------------------------------------------------------------- /tests/utils/greetings.opus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/tests/utils/greetings.opus -------------------------------------------------------------------------------- /tests/utils/random.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns a random number between min (inclusive) and max (exclusive) 3 | * @param {number} min: the minimum possible number. 4 | * @param {number} max: the maximum possible number. 5 | */ 6 | export const randomNumber = (min: number, max: number): number => { 7 | // FROM https://stackoverflow.com/questions/1527803/generating-random-whole-numbers-in-javascript-in-a-specific-range 8 | return Math.random() * (max - min) + min; 9 | }; 10 | 11 | /** 12 | * Returns a random integer between min (inclusive) and max (inclusive). 13 | * @param {number} min: the minimum possible number. 14 | * @param {number} max: the maximum possible number. 15 | */ 16 | export const randomInt = (min: number, max: number): number => { 17 | // FROM https://stackoverflow.com/questions/1527803/generating-random-whole-numbers-in-javascript-in-a-specific-range 18 | min = Math.ceil(min); 19 | max = Math.floor(max); 20 | return Math.floor(Math.random() * (max - min + 1)) + min; 21 | }; 22 | 23 | /** 24 | * Returns a random string. 25 | * @param {number} length: the length of the string. 26 | */ 27 | export const randomString = (length = 64): string => { 28 | // FROM https://gist.github.com/6174/6062387 29 | let ret = ''; 30 | for (let i = 0; i < length / 5; i++) { 31 | ret += 32 | i % 2 33 | ? Math.random().toString(36).substring(2, 7) 34 | : Math.random().toString(36).substring(2, 7).toUpperCase(); 35 | } 36 | return ret.substring(0, length); 37 | }; 38 | 39 | /** 40 | * Returns a random email. 41 | */ 42 | export const randomEmail = (): string => { 43 | return `${randomString(16)}@${randomString(16)}.com`; 44 | }; 45 | 46 | export default { 47 | randomNumber, 48 | randomInt, 49 | randomString, 50 | randomEmail, 51 | }; 52 | -------------------------------------------------------------------------------- /tests/utils/rtppacket.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/tests/utils/rtppacket.dat -------------------------------------------------------------------------------- /tests/utils/rtppayload.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/tests/utils/rtppayload.raw -------------------------------------------------------------------------------- /tests/utils/sample1.opus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/tests/utils/sample1.opus -------------------------------------------------------------------------------- /tests/utils/sample2.opus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/tests/utils/sample2.opus -------------------------------------------------------------------------------- /tests/utils/sample3.opus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/tests/utils/sample3.opus -------------------------------------------------------------------------------- /tests/utils/small.opus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libersys/rtp-ogg-opus/63ded6051ed2a90f1307a41bbd1bc7f7ded9d22a/tests/utils/small.opus -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2015" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, 4 | "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, 5 | "strict": true /* Enable all strict type-checking options. */, 6 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, 7 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, 8 | "declaration": true, 9 | "outDir": "dist" 10 | }, 11 | "include": ["lib"] 12 | } 13 | --------------------------------------------------------------------------------