├── .gitignore
├── .travis.yml
├── Example
├── Podfile
├── Podfile.lock
├── Pods
│ ├── Headers
│ │ ├── Private
│ │ │ └── speex
│ │ │ │ ├── AQRecorder.h
│ │ │ │ ├── CADebugMacros.h
│ │ │ │ ├── CAMath.h
│ │ │ │ ├── CAStreamBasicDescription.h
│ │ │ │ ├── CAXException.h
│ │ │ │ ├── Decapsulator.h
│ │ │ │ ├── Encapsulator.h
│ │ │ │ ├── PlayerManager.h
│ │ │ │ ├── RawAudioDataPlayer.h
│ │ │ │ ├── RecorderManager.h
│ │ │ │ ├── SpeexAllHeaders.h
│ │ │ │ ├── SpeexCodec.h
│ │ │ │ ├── _kiss_fft_guts.h
│ │ │ │ ├── arch.h
│ │ │ │ ├── cb_search.h
│ │ │ │ ├── cb_search_arm4.h
│ │ │ │ ├── cb_search_bfin.h
│ │ │ │ ├── cb_search_sse.h
│ │ │ │ ├── config.h
│ │ │ │ ├── fftwrap.h
│ │ │ │ ├── filterbank.h
│ │ │ │ ├── filters.h
│ │ │ │ ├── filters_arm4.h
│ │ │ │ ├── filters_bfin.h
│ │ │ │ ├── filters_sse.h
│ │ │ │ ├── fixed_arm4.h
│ │ │ │ ├── fixed_arm5e.h
│ │ │ │ ├── fixed_bfin.h
│ │ │ │ ├── fixed_debug.h
│ │ │ │ ├── fixed_generic.h
│ │ │ │ ├── kiss_fft.h
│ │ │ │ ├── kiss_fftr.h
│ │ │ │ ├── lpc.h
│ │ │ │ ├── lpc_bfin.h
│ │ │ │ ├── lsp.h
│ │ │ │ ├── lsp_bfin.h
│ │ │ │ ├── ltp.h
│ │ │ │ ├── ltp_arm4.h
│ │ │ │ ├── ltp_bfin.h
│ │ │ │ ├── ltp_sse.h
│ │ │ │ ├── math_approx.h
│ │ │ │ ├── misc_bfin.h
│ │ │ │ ├── modes.h
│ │ │ │ ├── nb_celp.h
│ │ │ │ ├── ogg.h
│ │ │ │ ├── os_support.h
│ │ │ │ ├── os_types.h
│ │ │ │ ├── pseudofloat.h
│ │ │ │ ├── quant_lsp.h
│ │ │ │ ├── quant_lsp_bfin.h
│ │ │ │ ├── resample_sse.h
│ │ │ │ ├── sb_celp.h
│ │ │ │ ├── smallft.h
│ │ │ │ ├── speex.h
│ │ │ │ ├── speex_bits.h
│ │ │ │ ├── speex_buffer.h
│ │ │ │ ├── speex_callbacks.h
│ │ │ │ ├── speex_config_types.h
│ │ │ │ ├── speex_echo.h
│ │ │ │ ├── speex_header.h
│ │ │ │ ├── speex_jitter.h
│ │ │ │ ├── speex_preprocess.h
│ │ │ │ ├── speex_resampler.h
│ │ │ │ ├── speex_stereo.h
│ │ │ │ ├── speex_types.h
│ │ │ │ ├── stack_alloc.h
│ │ │ │ ├── vbr.h
│ │ │ │ ├── vorbis_psy.h
│ │ │ │ ├── vq.h
│ │ │ │ ├── vq_arm4.h
│ │ │ │ ├── vq_bfin.h
│ │ │ │ └── vq_sse.h
│ │ └── Public
│ │ │ └── speex
│ │ │ ├── AQRecorder.h
│ │ │ ├── CADebugMacros.h
│ │ │ ├── CAMath.h
│ │ │ ├── CAStreamBasicDescription.h
│ │ │ ├── CAXException.h
│ │ │ ├── Decapsulator.h
│ │ │ ├── Encapsulator.h
│ │ │ ├── PlayerManager.h
│ │ │ ├── RawAudioDataPlayer.h
│ │ │ ├── RecorderManager.h
│ │ │ ├── SpeexAllHeaders.h
│ │ │ ├── SpeexCodec.h
│ │ │ ├── _kiss_fft_guts.h
│ │ │ ├── arch.h
│ │ │ ├── cb_search.h
│ │ │ ├── cb_search_arm4.h
│ │ │ ├── cb_search_bfin.h
│ │ │ ├── cb_search_sse.h
│ │ │ ├── config.h
│ │ │ ├── fftwrap.h
│ │ │ ├── filterbank.h
│ │ │ ├── filters.h
│ │ │ ├── filters_arm4.h
│ │ │ ├── filters_bfin.h
│ │ │ ├── filters_sse.h
│ │ │ ├── fixed_arm4.h
│ │ │ ├── fixed_arm5e.h
│ │ │ ├── fixed_bfin.h
│ │ │ ├── fixed_debug.h
│ │ │ ├── fixed_generic.h
│ │ │ ├── kiss_fft.h
│ │ │ ├── kiss_fftr.h
│ │ │ ├── lpc.h
│ │ │ ├── lpc_bfin.h
│ │ │ ├── lsp.h
│ │ │ ├── lsp_bfin.h
│ │ │ ├── ltp.h
│ │ │ ├── ltp_arm4.h
│ │ │ ├── ltp_bfin.h
│ │ │ ├── ltp_sse.h
│ │ │ ├── math_approx.h
│ │ │ ├── misc_bfin.h
│ │ │ ├── modes.h
│ │ │ ├── nb_celp.h
│ │ │ ├── ogg.h
│ │ │ ├── os_support.h
│ │ │ ├── os_types.h
│ │ │ ├── pseudofloat.h
│ │ │ ├── quant_lsp.h
│ │ │ ├── quant_lsp_bfin.h
│ │ │ ├── resample_sse.h
│ │ │ ├── sb_celp.h
│ │ │ ├── smallft.h
│ │ │ ├── speex.h
│ │ │ ├── speex_bits.h
│ │ │ ├── speex_buffer.h
│ │ │ ├── speex_callbacks.h
│ │ │ ├── speex_config_types.h
│ │ │ ├── speex_echo.h
│ │ │ ├── speex_header.h
│ │ │ ├── speex_jitter.h
│ │ │ ├── speex_preprocess.h
│ │ │ ├── speex_resampler.h
│ │ │ ├── speex_stereo.h
│ │ │ ├── speex_types.h
│ │ │ ├── stack_alloc.h
│ │ │ ├── vbr.h
│ │ │ ├── vorbis_psy.h
│ │ │ ├── vq.h
│ │ │ ├── vq_arm4.h
│ │ │ ├── vq_bfin.h
│ │ │ └── vq_sse.h
│ ├── Local Podspecs
│ │ └── speex.podspec.json
│ ├── Manifest.lock
│ ├── Pods.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── Pods-speex_Example-speex-speex.xcscheme
│ │ │ ├── Pods-speex_Example-speex.xcscheme
│ │ │ ├── Pods-speex_Tests-speex-speex.xcscheme
│ │ │ └── Pods-speex_Tests-speex.xcscheme
│ └── Target Support Files
│ │ ├── Pods-speex_Example-speex
│ │ ├── Info.plist
│ │ ├── Pods-speex_Example-speex-Private.xcconfig
│ │ ├── Pods-speex_Example-speex-dummy.m
│ │ ├── Pods-speex_Example-speex-prefix.pch
│ │ ├── Pods-speex_Example-speex-umbrella.h
│ │ ├── Pods-speex_Example-speex.modulemap
│ │ └── Pods-speex_Example-speex.xcconfig
│ │ └── Pods-speex_Example
│ │ ├── Info.plist
│ │ ├── Pods-speex_Example-acknowledgements.markdown
│ │ ├── Pods-speex_Example-acknowledgements.plist
│ │ ├── Pods-speex_Example-dummy.m
│ │ ├── Pods-speex_Example-environment.h
│ │ ├── Pods-speex_Example-frameworks.sh
│ │ ├── Pods-speex_Example-resources.sh
│ │ ├── Pods-speex_Example-umbrella.h
│ │ ├── Pods-speex_Example.debug.xcconfig
│ │ ├── Pods-speex_Example.modulemap
│ │ └── Pods-speex_Example.release.xcconfig
├── speex.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── speex-Example.xcscheme
├── speex.xcworkspace
│ └── contents.xcworkspacedata
└── speex
│ ├── Images.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── LaunchImage.launchimage
│ │ └── Contents.json
│ ├── Main.storyboard
│ ├── SpeexAppDelegate.h
│ ├── SpeexAppDelegate.m
│ ├── SpeexViewController.h
│ ├── SpeexViewController.m
│ ├── en.lproj
│ └── InfoPlist.strings
│ ├── main.m
│ ├── speex-Info.plist
│ └── speex-Prefix.pch
├── LICENSE
├── Pod
├── Assets
│ └── .gitkeep
└── Classes
│ ├── .gitkeep
│ ├── AQRecorder.h
│ ├── AQRecorder.mm
│ ├── Codec
│ ├── SpeexAllHeaders.h
│ ├── SpeexCodec.h
│ └── SpeexCodec.m
│ ├── Decapsulator.h
│ ├── Decapsulator.m
│ ├── Encapsulator.h
│ ├── Encapsulator.m
│ ├── Libs
│ ├── config.h
│ ├── libogg
│ │ ├── bitwise.c
│ │ ├── framing.c
│ │ └── ogg
│ │ │ ├── ogg.h
│ │ │ └── os_types.h
│ └── libspeex
│ │ ├── _kiss_fft_guts.h
│ │ ├── arch.h
│ │ ├── bits.c
│ │ ├── buffer.c
│ │ ├── cb_search.c
│ │ ├── cb_search.h
│ │ ├── cb_search_arm4.h
│ │ ├── cb_search_bfin.h
│ │ ├── cb_search_sse.h
│ │ ├── exc_10_16_table.c
│ │ ├── exc_10_32_table.c
│ │ ├── exc_20_32_table.c
│ │ ├── exc_5_256_table.c
│ │ ├── exc_5_64_table.c
│ │ ├── exc_8_128_table.c
│ │ ├── fftwrap.c
│ │ ├── fftwrap.h
│ │ ├── filterbank.c
│ │ ├── filterbank.h
│ │ ├── filters.c
│ │ ├── filters.h
│ │ ├── filters_arm4.h
│ │ ├── filters_bfin.h
│ │ ├── filters_sse.h
│ │ ├── fixed_arm4.h
│ │ ├── fixed_arm5e.h
│ │ ├── fixed_bfin.h
│ │ ├── fixed_debug.h
│ │ ├── fixed_generic.h
│ │ ├── gain_table.c
│ │ ├── gain_table_lbr.c
│ │ ├── hexc_10_32_table.c
│ │ ├── hexc_table.c
│ │ ├── high_lsp_tables.c
│ │ ├── jitter.c
│ │ ├── kiss_fft.c
│ │ ├── kiss_fft.h
│ │ ├── kiss_fftr.c
│ │ ├── kiss_fftr.h
│ │ ├── lpc.c
│ │ ├── lpc.h
│ │ ├── lpc_bfin.h
│ │ ├── lsp.c
│ │ ├── lsp.h
│ │ ├── lsp_bfin.h
│ │ ├── lsp_tables_nb.c
│ │ ├── ltp.c
│ │ ├── ltp.h
│ │ ├── ltp_arm4.h
│ │ ├── ltp_bfin.h
│ │ ├── ltp_sse.h
│ │ ├── math_approx.h
│ │ ├── mdf.c
│ │ ├── misc_bfin.h
│ │ ├── modes.c
│ │ ├── modes.h
│ │ ├── modes_wb.c
│ │ ├── nb_celp.c
│ │ ├── nb_celp.h
│ │ ├── os_support.h
│ │ ├── preprocess.c
│ │ ├── pseudofloat.h
│ │ ├── quant_lsp.c
│ │ ├── quant_lsp.h
│ │ ├── quant_lsp_bfin.h
│ │ ├── resample.c
│ │ ├── resample_sse.h
│ │ ├── sb_celp.c
│ │ ├── sb_celp.h
│ │ ├── scal.c
│ │ ├── smallft.c
│ │ ├── smallft.h
│ │ ├── speex.c
│ │ ├── speex
│ │ ├── speex.h
│ │ ├── speex_bits.h
│ │ ├── speex_buffer.h
│ │ ├── speex_callbacks.h
│ │ ├── speex_config_types.h
│ │ ├── speex_config_types.h.in
│ │ ├── speex_echo.h
│ │ ├── speex_header.h
│ │ ├── speex_jitter.h
│ │ ├── speex_preprocess.h
│ │ ├── speex_resampler.h
│ │ ├── speex_stereo.h
│ │ └── speex_types.h
│ │ ├── speex_callbacks.c
│ │ ├── speex_header.c
│ │ ├── stack_alloc.h
│ │ ├── stereo.c
│ │ ├── testdenoise.c
│ │ ├── testecho.c
│ │ ├── testenc.c
│ │ ├── testenc_uwb.c
│ │ ├── testenc_wb.c
│ │ ├── testjitter.c
│ │ ├── vbr.c
│ │ ├── vbr.h
│ │ ├── vorbis_psy.h
│ │ ├── vq.c
│ │ ├── vq.h
│ │ ├── vq_arm4.h
│ │ ├── vq_bfin.h
│ │ ├── vq_sse.h
│ │ └── window.c
│ ├── PlayerManager.h
│ ├── PlayerManager.m
│ ├── PublicUtility
│ ├── CADebugMacros.cpp
│ ├── CADebugMacros.h
│ ├── CAMath.h
│ ├── CAStreamBasicDescription.cpp
│ ├── CAStreamBasicDescription.h
│ ├── CAXException.cpp
│ └── CAXException.h
│ ├── RawAudioDataPlayer.h
│ ├── RawAudioDataPlayer.m
│ ├── RecorderManager.h
│ └── RecorderManager.mm
├── README.md
├── _Pods.xcodeproj
└── speex.podspec
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS X
2 | .DS_Store
3 |
4 | # Xcode
5 | build/
6 | *.pbxuser
7 | !default.pbxuser
8 | *.mode1v3
9 | !default.mode1v3
10 | *.mode2v3
11 | !default.mode2v3
12 | *.perspectivev3
13 | !default.perspectivev3
14 | xcuserdata
15 | *.xccheckout
16 | profile
17 | *.moved-aside
18 | DerivedData
19 | *.hmap
20 | *.ipa
21 |
22 | # Bundler
23 | .bundle
24 |
25 | Carthage
26 | # We recommend against adding the Pods directory to your .gitignore. However
27 | # you should judge for yourself, the pros and cons are mentioned at:
28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
29 | #
30 | # Note: if you ignore the Pods directory, make sure to uncomment
31 | # `pod install` in .travis.yml
32 | #
33 | # Pods/
34 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | # references:
2 | # * http://www.objc.io/issue-6/travis-ci.html
3 | # * https://github.com/supermarin/xcpretty#usage
4 |
5 | language: objective-c
6 | # cache: cocoapods
7 | # podfile: Example/Podfile
8 | # before_install:
9 | # - gem install cocoapods # Since Travis is not always on latest version
10 | # - pod install --project-directory=Example
11 | install:
12 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet
13 | script:
14 | - set -o pipefail && xcodebuild test -workspace Example/speex.xcworkspace -scheme speex-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c
15 | - pod lib lint --quick
16 |
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | source 'https://github.com/CocoaPods/Specs.git'
2 | use_frameworks!
3 |
4 | target 'speex_Example', :exclusive => true do
5 | pod "speex", :path => "../"
6 | end
7 |
--------------------------------------------------------------------------------
/Example/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - speex (0.1.0)
3 |
4 | DEPENDENCIES:
5 | - speex (from `../`)
6 |
7 | EXTERNAL SOURCES:
8 | speex:
9 | :path: "../"
10 |
11 | SPEC CHECKSUMS:
12 | speex: 269a34dab816815d03446dc0e57418a6a6f42994
13 |
14 | COCOAPODS: 0.37.2
15 |
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/AQRecorder.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/AQRecorder.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/CADebugMacros.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/PublicUtility/CADebugMacros.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/CAMath.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/PublicUtility/CAMath.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/CAStreamBasicDescription.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/PublicUtility/CAStreamBasicDescription.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/CAXException.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/PublicUtility/CAXException.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/Decapsulator.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Decapsulator.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/Encapsulator.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Encapsulator.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/PlayerManager.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/PlayerManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/RawAudioDataPlayer.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/RawAudioDataPlayer.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/RecorderManager.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/RecorderManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/SpeexAllHeaders.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Codec/SpeexAllHeaders.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/SpeexCodec.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Codec/SpeexCodec.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/_kiss_fft_guts.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/_kiss_fft_guts.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/arch.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/arch.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/cb_search.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/cb_search.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/cb_search_arm4.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/cb_search_arm4.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/cb_search_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/cb_search_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/cb_search_sse.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/cb_search_sse.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/config.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/config.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/fftwrap.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fftwrap.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/filterbank.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/filterbank.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/filters.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/filters.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/filters_arm4.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/filters_arm4.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/filters_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/filters_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/filters_sse.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/filters_sse.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/fixed_arm4.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fixed_arm4.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/fixed_arm5e.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fixed_arm5e.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/fixed_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fixed_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/fixed_debug.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fixed_debug.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/fixed_generic.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fixed_generic.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/kiss_fft.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/kiss_fft.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/kiss_fftr.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/kiss_fftr.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/lpc.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/lpc.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/lpc_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/lpc_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/lsp.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/lsp.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/lsp_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/lsp_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/ltp.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/ltp.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/ltp_arm4.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/ltp_arm4.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/ltp_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/ltp_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/ltp_sse.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/ltp_sse.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/math_approx.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/math_approx.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/misc_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/misc_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/modes.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/modes.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/nb_celp.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/nb_celp.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/ogg.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libogg/ogg/ogg.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/os_support.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/os_support.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/os_types.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libogg/ogg/os_types.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/pseudofloat.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/pseudofloat.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/quant_lsp.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/quant_lsp.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/quant_lsp_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/quant_lsp_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/resample_sse.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/resample_sse.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/sb_celp.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/sb_celp.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/smallft.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/smallft.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex_bits.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_bits.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex_buffer.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_buffer.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex_callbacks.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_callbacks.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex_config_types.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_config_types.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex_echo.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_echo.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex_header.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_header.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex_jitter.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_jitter.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex_preprocess.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_preprocess.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex_resampler.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_resampler.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex_stereo.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_stereo.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/speex_types.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_types.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/stack_alloc.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/stack_alloc.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/vbr.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vbr.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/vorbis_psy.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vorbis_psy.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/vq.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vq.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/vq_arm4.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vq_arm4.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/vq_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vq_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/speex/vq_sse.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vq_sse.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/AQRecorder.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/AQRecorder.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/CADebugMacros.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/PublicUtility/CADebugMacros.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/CAMath.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/PublicUtility/CAMath.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/CAStreamBasicDescription.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/PublicUtility/CAStreamBasicDescription.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/CAXException.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/PublicUtility/CAXException.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/Decapsulator.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Decapsulator.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/Encapsulator.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Encapsulator.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/PlayerManager.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/PlayerManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/RawAudioDataPlayer.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/RawAudioDataPlayer.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/RecorderManager.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/RecorderManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/SpeexAllHeaders.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Codec/SpeexAllHeaders.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/SpeexCodec.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Codec/SpeexCodec.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/_kiss_fft_guts.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/_kiss_fft_guts.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/arch.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/arch.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/cb_search.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/cb_search.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/cb_search_arm4.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/cb_search_arm4.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/cb_search_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/cb_search_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/cb_search_sse.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/cb_search_sse.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/config.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/config.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/fftwrap.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fftwrap.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/filterbank.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/filterbank.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/filters.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/filters.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/filters_arm4.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/filters_arm4.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/filters_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/filters_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/filters_sse.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/filters_sse.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/fixed_arm4.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fixed_arm4.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/fixed_arm5e.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fixed_arm5e.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/fixed_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fixed_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/fixed_debug.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fixed_debug.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/fixed_generic.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/fixed_generic.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/kiss_fft.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/kiss_fft.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/kiss_fftr.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/kiss_fftr.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/lpc.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/lpc.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/lpc_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/lpc_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/lsp.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/lsp.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/lsp_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/lsp_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/ltp.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/ltp.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/ltp_arm4.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/ltp_arm4.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/ltp_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/ltp_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/ltp_sse.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/ltp_sse.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/math_approx.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/math_approx.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/misc_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/misc_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/modes.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/modes.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/nb_celp.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/nb_celp.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/ogg.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libogg/ogg/ogg.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/os_support.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/os_support.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/os_types.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libogg/ogg/os_types.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/pseudofloat.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/pseudofloat.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/quant_lsp.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/quant_lsp.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/quant_lsp_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/quant_lsp_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/resample_sse.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/resample_sse.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/sb_celp.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/sb_celp.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/smallft.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/smallft.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex_bits.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_bits.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex_buffer.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_buffer.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex_callbacks.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_callbacks.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex_config_types.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_config_types.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex_echo.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_echo.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex_header.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_header.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex_jitter.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_jitter.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex_preprocess.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_preprocess.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex_resampler.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_resampler.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex_stereo.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_stereo.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/speex_types.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/speex/speex_types.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/stack_alloc.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/stack_alloc.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/vbr.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vbr.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/vorbis_psy.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vorbis_psy.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/vq.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vq.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/vq_arm4.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vq_arm4.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/vq_bfin.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vq_bfin.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/speex/vq_sse.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/Libs/libspeex/vq_sse.h
--------------------------------------------------------------------------------
/Example/Pods/Local Podspecs/speex.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "speex",
3 | "version": "0.1.0",
4 | "summary": "A short description of speex.",
5 | "description": "",
6 | "homepage": "https://github.com/guange2015/speex",
7 | "license": "MIT",
8 | "authors": {
9 | "guange": "8863824@gmail.com"
10 | },
11 | "source": {
12 | "git": "https://github.com/guange2015/speex.git",
13 | "tag": "0.1.0"
14 | },
15 | "platforms": {
16 | "ios": "7.0"
17 | },
18 | "requires_arc": true,
19 | "source_files": "Pod/Classes/**/*",
20 | "resource_bundles": {
21 | "speex": [
22 | "Pod/Assets/*.png"
23 | ]
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Example/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - speex (0.1.0)
3 |
4 | DEPENDENCIES:
5 | - speex (from `../`)
6 |
7 | EXTERNAL SOURCES:
8 | speex:
9 | :path: "../"
10 |
11 | SPEC CHECKSUMS:
12 | speex: 269a34dab816815d03446dc0e57418a6a6f42994
13 |
14 | COCOAPODS: 0.37.2
15 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-speex_Example-speex-speex.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-speex_Example-speex.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-speex_Tests-speex-speex.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-speex_Tests-speex.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example-speex/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 0.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example-speex/Pods-speex_Example-speex-Private.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods-speex_Example-speex.xcconfig"
2 | CONFIGURATION_BUILD_DIR = $PODS_FRAMEWORK_BUILD_PATH
3 | FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/speex" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/speex"
6 | OTHER_LDFLAGS = -ObjC
7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-speex_Example
8 | PODS_ROOT = ${SRCROOT}
9 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example-speex/Pods-speex_Example-speex-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_speex_Example_speex : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_speex_Example_speex
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example-speex/Pods-speex_Example-speex-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 | #import "Pods-speex_Example-environment.h"
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example-speex/Pods-speex_Example-speex-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AQRecorder.h"
4 | #import "SpeexAllHeaders.h"
5 | #import "SpeexCodec.h"
6 | #import "Decapsulator.h"
7 | #import "Encapsulator.h"
8 | #import "config.h"
9 | #import "ogg.h"
10 | #import "os_types.h"
11 | #import "_kiss_fft_guts.h"
12 | #import "arch.h"
13 | #import "cb_search.h"
14 | #import "cb_search_arm4.h"
15 | #import "cb_search_bfin.h"
16 | #import "cb_search_sse.h"
17 | #import "fftwrap.h"
18 | #import "filterbank.h"
19 | #import "filters.h"
20 | #import "filters_arm4.h"
21 | #import "filters_bfin.h"
22 | #import "filters_sse.h"
23 | #import "fixed_arm4.h"
24 | #import "fixed_arm5e.h"
25 | #import "fixed_bfin.h"
26 | #import "fixed_debug.h"
27 | #import "fixed_generic.h"
28 | #import "kiss_fft.h"
29 | #import "kiss_fftr.h"
30 | #import "lpc.h"
31 | #import "lpc_bfin.h"
32 | #import "lsp.h"
33 | #import "lsp_bfin.h"
34 | #import "ltp.h"
35 | #import "ltp_arm4.h"
36 | #import "ltp_bfin.h"
37 | #import "ltp_sse.h"
38 | #import "math_approx.h"
39 | #import "misc_bfin.h"
40 | #import "modes.h"
41 | #import "nb_celp.h"
42 | #import "os_support.h"
43 | #import "pseudofloat.h"
44 | #import "quant_lsp.h"
45 | #import "quant_lsp_bfin.h"
46 | #import "resample_sse.h"
47 | #import "sb_celp.h"
48 | #import "smallft.h"
49 | #import "speex.h"
50 | #import "speex_bits.h"
51 | #import "speex_buffer.h"
52 | #import "speex_callbacks.h"
53 | #import "speex_config_types.h"
54 | #import "speex_echo.h"
55 | #import "speex_header.h"
56 | #import "speex_jitter.h"
57 | #import "speex_preprocess.h"
58 | #import "speex_resampler.h"
59 | #import "speex_stereo.h"
60 | #import "speex_types.h"
61 | #import "stack_alloc.h"
62 | #import "vbr.h"
63 | #import "vorbis_psy.h"
64 | #import "vq.h"
65 | #import "vq_arm4.h"
66 | #import "vq_bfin.h"
67 | #import "vq_sse.h"
68 | #import "PlayerManager.h"
69 | #import "CADebugMacros.h"
70 | #import "CAMath.h"
71 | #import "CAStreamBasicDescription.h"
72 | #import "CAXException.h"
73 | #import "RawAudioDataPlayer.h"
74 | #import "RecorderManager.h"
75 |
76 | FOUNDATION_EXPORT double speexVersionNumber;
77 | FOUNDATION_EXPORT const unsigned char speexVersionString[];
78 |
79 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example-speex/Pods-speex_Example-speex.modulemap:
--------------------------------------------------------------------------------
1 | framework module speex {
2 | umbrella header "Pods-speex_Example-speex-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example-speex/Pods-speex_Example-speex.xcconfig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guange2015/speex/726def063263ec977d99e6fc00a32cd34e47289c/Example/Pods/Target Support Files/Pods-speex_Example-speex/Pods-speex_Example-speex.xcconfig
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example/Pods-speex_Example-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## speex
5 |
6 | Copyright (c) 2015 guange <8863824@gmail.com>
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 |
26 | Generated by CocoaPods - http://cocoapods.org
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example/Pods-speex_Example-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Copyright (c) 2015 guange <8863824@gmail.com>
18 |
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is
24 | furnished to do so, subject to the following conditions:
25 |
26 | The above copyright notice and this permission notice shall be included in
27 | all copies or substantial portions of the Software.
28 |
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 |
37 | Title
38 | speex
39 | Type
40 | PSGroupSpecifier
41 |
42 |
43 | FooterText
44 | Generated by CocoaPods - http://cocoapods.org
45 | Title
46 |
47 | Type
48 | PSGroupSpecifier
49 |
50 |
51 | StringsTable
52 | Acknowledgements
53 | Title
54 | Acknowledgements
55 |
56 |
57 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example/Pods-speex_Example-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_speex_Example : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_speex_Example
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example/Pods-speex_Example-environment.h:
--------------------------------------------------------------------------------
1 |
2 | // To check if a library is compiled with CocoaPods you
3 | // can use the `COCOAPODS` macro definition which is
4 | // defined in the xcconfigs so it is available in
5 | // headers also when they are imported in the client
6 | // project.
7 |
8 |
9 | // speex
10 | #define COCOAPODS_POD_AVAILABLE_speex
11 | #define COCOAPODS_VERSION_MAJOR_speex 0
12 | #define COCOAPODS_VERSION_MINOR_speex 1
13 | #define COCOAPODS_VERSION_PATCH_speex 0
14 |
15 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example/Pods-speex_Example-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
6 |
7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
8 |
9 | install_framework()
10 | {
11 | local source="${BUILT_PRODUCTS_DIR}/Pods-speex_Example/$1"
12 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
13 |
14 | if [ -L "${source}" ]; then
15 | echo "Symlinked..."
16 | source=$(readlink "${source}")
17 | fi
18 |
19 | # use filter instead of exclude so missing patterns dont' throw errors
20 | echo "rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" --filter "- Modules/" ${source} ${destination}"
21 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" --filter "- Modules/" "${source}" "${destination}"
22 | # Resign the code if required by the build settings to avoid unstable apps
23 | if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then
24 | code_sign "${destination}/$1"
25 | fi
26 |
27 | # Embed linked Swift runtime libraries
28 | local basename
29 | basename=$(echo $1 | sed -E s/\\..+// && exit ${PIPESTATUS[0]})
30 | local swift_runtime_libs
31 | swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/$1/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
32 | for lib in $swift_runtime_libs; do
33 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
34 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
35 | if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then
36 | code_sign "${destination}/${lib}"
37 | fi
38 | done
39 | }
40 |
41 | # Signs a framework with the provided identity
42 | code_sign() {
43 | # Use the current code_sign_identitiy
44 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
45 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1"
46 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1"
47 | }
48 |
49 |
50 | if [[ "$CONFIGURATION" == "Debug" ]]; then
51 | install_framework 'speex.framework'
52 | fi
53 | if [[ "$CONFIGURATION" == "Release" ]]; then
54 | install_framework 'speex.framework'
55 | fi
56 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example/Pods-speex_Example-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | FOUNDATION_EXPORT double Pods_speex_ExampleVersionNumber;
5 | FOUNDATION_EXPORT const unsigned char Pods_speex_ExampleVersionString[];
6 |
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example/Pods-speex_Example.debug.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_FRAMEWORK_BUILD_PATH"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/speex.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "speex"
6 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-speex_Example
8 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example/Pods-speex_Example.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_speex_Example {
2 | umbrella header "Pods-speex_Example-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-speex_Example/Pods-speex_Example.release.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_FRAMEWORK_BUILD_PATH"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/speex.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "speex"
6 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-speex_Example
8 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Example/speex.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/speex.xcodeproj/xcshareddata/xcschemes/speex-Example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
61 |
63 |
69 |
70 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/Example/speex.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/speex/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "ipad",
20 | "size" : "29x29",
21 | "scale" : "1x"
22 | },
23 | {
24 | "idiom" : "ipad",
25 | "size" : "29x29",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "ipad",
30 | "size" : "40x40",
31 | "scale" : "1x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "40x40",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "76x76",
41 | "scale" : "1x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "76x76",
46 | "scale" : "2x"
47 | }
48 | ],
49 | "info" : {
50 | "version" : 1,
51 | "author" : "xcode"
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Example/speex/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | },
18 | {
19 | "orientation" : "portrait",
20 | "idiom" : "ipad",
21 | "extent" : "full-screen",
22 | "minimum-system-version" : "7.0",
23 | "scale" : "1x"
24 | },
25 | {
26 | "orientation" : "landscape",
27 | "idiom" : "ipad",
28 | "extent" : "full-screen",
29 | "minimum-system-version" : "7.0",
30 | "scale" : "1x"
31 | },
32 | {
33 | "orientation" : "portrait",
34 | "idiom" : "ipad",
35 | "extent" : "full-screen",
36 | "minimum-system-version" : "7.0",
37 | "scale" : "2x"
38 | },
39 | {
40 | "orientation" : "landscape",
41 | "idiom" : "ipad",
42 | "extent" : "full-screen",
43 | "minimum-system-version" : "7.0",
44 | "scale" : "2x"
45 | }
46 | ],
47 | "info" : {
48 | "version" : 1,
49 | "author" : "xcode"
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Example/speex/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
26 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Example/speex/SpeexAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // SpeexAppDelegate.h
3 | // speex
4 | //
5 | // Created by guange on 09/06/2015.
6 | // Copyright (c) 2015 guange. All rights reserved.
7 | //
8 |
9 | @import UIKit;
10 |
11 | @interface SpeexAppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Example/speex/SpeexAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // SpeexAppDelegate.m
3 | // speex
4 | //
5 | // Created by guange on 09/06/2015.
6 | // Copyright (c) 2015 guange. All rights reserved.
7 | //
8 |
9 | #import "SpeexAppDelegate.h"
10 |
11 | @implementation SpeexAppDelegate
12 |
13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
14 | {
15 | // Override point for customization after application launch.
16 | return YES;
17 | }
18 |
19 | - (void)applicationWillResignActive:(UIApplication *)application
20 | {
21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
23 | }
24 |
25 | - (void)applicationDidEnterBackground:(UIApplication *)application
26 | {
27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 | }
30 |
31 | - (void)applicationWillEnterForeground:(UIApplication *)application
32 | {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | - (void)applicationDidBecomeActive:(UIApplication *)application
37 | {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application
42 | {
43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Example/speex/SpeexViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SpeexViewController.h
3 | // speex
4 | //
5 | // Created by guange on 09/06/2015.
6 | // Copyright (c) 2015 guange. All rights reserved.
7 | //
8 |
9 | @import UIKit;
10 |
11 | @interface SpeexViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/speex/SpeexViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SpeexViewController.m
3 | // speex
4 | //
5 | // Created by guange on 09/06/2015.
6 | // Copyright (c) 2015 guange. All rights reserved.
7 | //
8 |
9 | #import "SpeexViewController.h"
10 | #import "RecorderManager.h"
11 | #import "PlayerManager.h"
12 |
13 | @interface SpeexViewController ()
14 |
15 | @property (nonatomic, assign) BOOL isRecording;
16 | @property (nonatomic, assign) BOOL isPlaying;
17 |
18 | @property (nonatomic, copy) NSString *filename;
19 | @property (weak, nonatomic) IBOutlet UIButton *recordBtn;
20 | @property (weak, nonatomic) IBOutlet UIButton *playBtn;
21 |
22 | @end
23 |
24 | @implementation SpeexViewController
25 |
26 | - (void)viewDidLoad
27 | {
28 | [super viewDidLoad];
29 | // Do any additional setup after loading the view, typically from a nib.
30 |
31 | [self.recordBtn addTarget:self action:@selector(Record) forControlEvents:UIControlEventTouchUpInside];
32 | [self.playBtn addTarget:self action:@selector(Play) forControlEvents:UIControlEventTouchUpInside];
33 | }
34 |
35 | - (void)didReceiveMemoryWarning
36 | {
37 | [super didReceiveMemoryWarning];
38 | // Dispose of any resources that can be recreated.
39 | }
40 |
41 |
42 | -(void)Record {
43 | if (self.isPlaying) {
44 | return;
45 | }
46 | if ( ! self.isRecording) {
47 | self.isRecording = YES;
48 | [RecorderManager sharedManager].delegate = self;
49 | [[RecorderManager sharedManager] startRecording];
50 | }
51 | else {
52 | self.isRecording = NO;
53 | [[RecorderManager sharedManager] stopRecording];
54 | }
55 | }
56 |
57 |
58 | -(void)Play {
59 | if (self.isRecording) {
60 | return;
61 | }
62 | if ( ! self.isPlaying) {
63 | [PlayerManager sharedManager].delegate = nil;
64 |
65 | self.isPlaying = YES;
66 | NSString *msg = [NSString stringWithFormat:@"正在播放: %@", [self.filename substringFromIndex:[self.filename rangeOfString:@"Documents"].location]];
67 | NSLog(msg);
68 | [[PlayerManager sharedManager] playAudioWithFileName:self.filename delegate:self];
69 | }
70 | else {
71 | self.isPlaying = NO;
72 | [[PlayerManager sharedManager] stopPlaying];
73 | }
74 | }
75 |
76 |
77 | #pragma mark - Recording & Playing Delegate
78 |
79 | - (void)recordingFinishedWithFileName:(NSString *)filePath time:(NSTimeInterval)interval {
80 | self.isRecording = NO;
81 | self.filename = filePath;
82 |
83 | }
84 |
85 | - (void)recordingTimeout {
86 | self.isRecording = NO;
87 | NSLog(@"录音超时");
88 | }
89 |
90 | - (void)recordingStopped {
91 | self.isRecording = NO;
92 | }
93 |
94 | - (void)recordingFailed:(NSString *)failureInfoString {
95 | self.isRecording = NO;
96 | NSLog(@"录音失败");
97 | }
98 |
99 | - (void)levelMeterChanged:(float)levelMeter {
100 | }
101 |
102 | - (void)playingStoped {
103 | self.isPlaying = NO;
104 | NSString *msg = [NSString stringWithFormat:@"播放完成: %@", [self.filename substringFromIndex:[self.filename rangeOfString:@"Documents"].location]];
105 | NSLog(msg);
106 | }
107 |
108 |
109 | @end
110 |
--------------------------------------------------------------------------------
/Example/speex/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Example/speex/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // speex
4 | //
5 | // Created by guange on 09/06/2015.
6 | // Copyright (c) 2015 guange. All rights reserved.
7 | //
8 |
9 | @import UIKit;
10 | #import "SpeexAppDelegate.h"
11 |
12 | int main(int argc, char * argv[])
13 | {
14 | @autoreleasepool {
15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([SpeexAppDelegate class]));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Example/speex/speex-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Example/speex/speex-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_5_0
10 | #warning "This project uses features only available in iOS SDK 5.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | @import UIKit;
15 | @import Foundation;
16 | #endif
17 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015 guange <8863824@gmail.com>
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Pod/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guange2015/speex/726def063263ec977d99e6fc00a32cd34e47289c/Pod/Assets/.gitkeep
--------------------------------------------------------------------------------
/Pod/Classes/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guange2015/speex/726def063263ec977d99e6fc00a32cd34e47289c/Pod/Classes/.gitkeep
--------------------------------------------------------------------------------
/Pod/Classes/AQRecorder.h:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | File: AQRecorder.h
4 | Abstract: Helper class for recording audio files via the AudioQueue
5 | Version: 2.5
6 |
7 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
8 | Inc. ("Apple") in consideration of your agreement to the following
9 | terms, and your use, installation, modification or redistribution of
10 | this Apple software constitutes acceptance of these terms. If you do
11 | not agree with these terms, please do not use, install, modify or
12 | redistribute this Apple software.
13 |
14 | In consideration of your agreement to abide by the following terms, and
15 | subject to these terms, Apple grants you a personal, non-exclusive
16 | license, under Apple's copyrights in this original Apple software (the
17 | "Apple Software"), to use, reproduce, modify and redistribute the Apple
18 | Software, with or without modifications, in source and/or binary forms;
19 | provided that if you redistribute the Apple Software in its entirety and
20 | without modifications, you must retain this notice and the following
21 | text and disclaimers in all such redistributions of the Apple Software.
22 | Neither the name, trademarks, service marks or logos of Apple Inc. may
23 | be used to endorse or promote products derived from the Apple Software
24 | without specific prior written permission from Apple. Except as
25 | expressly stated in this notice, no other rights or licenses, express or
26 | implied, are granted by Apple herein, including but not limited to any
27 | patent rights that may be infringed by your derivative works or by other
28 | works in which the Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
33 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
34 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
37 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
38 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
39 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
40 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
41 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
42 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
43 | POSSIBILITY OF SUCH DAMAGE.
44 |
45 | Copyright (C) 2012 Apple Inc. All Rights Reserved.
46 |
47 |
48 | */
49 |
50 | #include
51 | #include
52 | #include
53 |
54 | #include "CAStreamBasicDescription.h"
55 | #include "CAXException.h"
56 | #include "Encapsulator.h"
57 |
58 | #define kNumberRecordBuffers 3
59 | #define kBufferDurationSeconds .5
60 |
61 | class AQRecorder
62 | {
63 | public:
64 | AQRecorder();
65 | ~AQRecorder();
66 |
67 | UInt32 GetNumberChannels() const { return mRecordFormat.NumberChannels(); }
68 | AudioQueueRef Queue() const { return mQueue; }
69 | CAStreamBasicDescription DataFormat() const { return mRecordFormat; }
70 |
71 | Boolean StartRecord(Encapsulator *encapsulator);
72 | void StopRecord();
73 | Boolean IsRunning() const { return mIsRunning; }
74 |
75 | UInt64 startTime;
76 |
77 | private:
78 | AudioQueueRef mQueue;
79 | AudioQueueBufferRef mBuffers[kNumberRecordBuffers];
80 | SInt64 mRecordPacket; // current packet number in record file
81 | CAStreamBasicDescription mRecordFormat;
82 | Boolean mIsRunning;
83 |
84 | OSStatus errorStatus;
85 | Encapsulator *mEncapsulator;
86 |
87 | void SetupAudioFormat(UInt32 inFormatID);
88 | int ComputeRecordBufferSize(const AudioStreamBasicDescription *format, float seconds);
89 |
90 | static void MyInputBufferHandler( void * inUserData,
91 | AudioQueueRef inAQ,
92 | AudioQueueBufferRef inBuffer,
93 | const AudioTimeStamp * inStartTime,
94 | UInt32 inNumPackets,
95 | const AudioStreamPacketDescription* inPacketDesc);
96 | };
--------------------------------------------------------------------------------
/Pod/Classes/Codec/SpeexAllHeaders.h:
--------------------------------------------------------------------------------
1 | //
2 | // SpeexAllHeaders.h
3 | // OggSpeex
4 | //
5 | // Created by Jiang Chuncheng on 11/26/12.
6 | // Copyright (c) 2012 Sense Force. All rights reserved.
7 | //
8 |
9 | #ifndef OggSpeex_SpeexAllHeaders_h
10 | #define OggSpeex_SpeexAllHeaders_h
11 |
12 | #import "ogg.h"
13 | #import "os_types.h"
14 | #import "speex.h"
15 | #import "speex_bits.h"
16 | #import "speex_buffer.h"
17 | #import "speex_callbacks.h"
18 | #import "speex_config_types.h"
19 | #import "speex_echo.h"
20 | #import "speex_header.h"
21 | #import "speex_jitter.h"
22 | #import "speex_preprocess.h"
23 | #import "speex_stereo.h"
24 | #import "speex_types.h"
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/Pod/Classes/Codec/SpeexCodec.h:
--------------------------------------------------------------------------------
1 | //
2 | // SpeexCodec.h
3 | // OggSpeex
4 | //
5 | // Created by Jiang Chuncheng on 11/26/12.
6 | // Copyright (c) 2012 Sense Force. All rights reserved.
7 | //
8 |
9 | /**----Guide----
10 | * Encode: open -> encode:length -> close
11 | * Decode: open -> encode:length:output -> close
12 | */
13 |
14 | #import
15 | #import "SpeexAllHeaders.h"
16 |
17 | @interface SpeexCodec : NSObject {
18 | int codecOpenedTimes; //the times the codec is opened
19 |
20 | int encodeFrameSize;
21 | int decodeFrameSize;
22 | SpeexBits encodeSpeexBits;
23 | SpeexBits decodeSpeexBits;
24 | void *encodeState;
25 | void *decodeState;
26 | }
27 |
28 | - (void)open:(int)quality;
29 | - (NSData *)encode:(short *)pcmBuffer length:(int)lengthOfShorts;
30 | - (int)decode:(Byte *)encodedBytes length:(int)lengthOfBytes output:(short *)decoded;
31 | - (void)close;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Pod/Classes/Codec/SpeexCodec.m:
--------------------------------------------------------------------------------
1 | //
2 | // SpeexCodec.m
3 | // OggSpeex
4 | //
5 | // Created by Jiang Chuncheng on 11/26/12.
6 | // Copyright (c) 2012 Sense Force. All rights reserved.
7 | //
8 |
9 | #import "SpeexCodec.h"
10 |
11 | @implementation SpeexCodec
12 | - (id)init {
13 | if (self = [super init]) {
14 | codecOpenedTimes = 0;
15 | }
16 | return self;
17 | }
18 |
19 | /*
20 | quality value 1 ~ 10
21 | */
22 | - (void)open:(int)quality {
23 | if ((quality < 1) || (quality > 10)) {
24 | return;
25 | }
26 | if (codecOpenedTimes++ != 0) {
27 | return;
28 | }
29 | else {
30 | speex_bits_init(&encodeSpeexBits);
31 | speex_bits_init(&decodeSpeexBits);
32 |
33 | encodeState = speex_encoder_init(&speex_nb_mode);
34 | decodeState = speex_decoder_init(&speex_nb_mode);
35 |
36 | int tmp = quality;
37 | speex_encoder_ctl(encodeState, SPEEX_SET_QUALITY, &tmp);
38 | speex_encoder_ctl(encodeState, SPEEX_GET_FRAME_SIZE, &encodeFrameSize);
39 | speex_decoder_ctl(decodeState, SPEEX_GET_FRAME_SIZE, &decodeFrameSize);
40 | }
41 | }
42 |
43 | - (NSData *)encode:(short *)pcmBuffer length:(int)lengthOfShorts {
44 | if (codecOpenedTimes == 0) {
45 | return nil;
46 | }
47 |
48 | NSMutableData *decodedData = [NSMutableData dataWithCapacity:20];
49 |
50 | short input_frame[encodeFrameSize];
51 | char cbits[200];
52 | int nbBytes;
53 |
54 | speex_bits_reset(&encodeSpeexBits);
55 |
56 | int nSamples = (int)ceil(lengthOfShorts / (float)encodeFrameSize);
57 |
58 | for (int sampleIndex = 0; sampleIndex < nSamples; sampleIndex++) {
59 | memcpy(input_frame, pcmBuffer + (sampleIndex * encodeFrameSize * sizeof(short)), encodeFrameSize * sizeof(short));
60 | speex_encode_int(encodeState, input_frame, &encodeSpeexBits);
61 | nbBytes = speex_bits_write(&encodeSpeexBits, cbits, encodeFrameSize);
62 |
63 | [decodedData appendBytes:cbits length:nbBytes];
64 | }
65 |
66 | return decodedData;
67 | }
68 |
69 | - (int)decode:(unsigned char *)encodedBytes length:(int)lengthOfBytes output:(short *)decoded {
70 | if ( ! codecOpenedTimes)
71 | return 0;
72 |
73 | char cbits[200];
74 | memcpy(cbits, encodedBytes, lengthOfBytes);
75 |
76 | speex_bits_read_from(&decodeSpeexBits, cbits, lengthOfBytes);
77 |
78 | speex_decode_int(decodeState, &decodeSpeexBits, decoded);
79 |
80 | return decodeFrameSize;
81 | }
82 |
83 | - (void)close {
84 | if (--codecOpenedTimes != 0) {
85 | return;
86 | }
87 |
88 | speex_bits_destroy(&encodeSpeexBits);
89 | speex_bits_destroy(&decodeSpeexBits);
90 | speex_encoder_destroy(encodeState);
91 | speex_decoder_destroy(decodeState);
92 | }
93 |
94 | - (void)dealloc {
95 | [self close];
96 | #if !__has_feature(objc_arc)
97 | [super dealloc];
98 | #endif
99 | }
100 |
101 | @end
--------------------------------------------------------------------------------
/Pod/Classes/Decapsulator.h:
--------------------------------------------------------------------------------
1 | //
2 | // Decapsulator.h
3 | // OggSpeex
4 | //
5 | // Created by Jiang Chuncheng on 6/25/13.
6 | // Copyright (c) 2013 Sense Force. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "SpeexCodec.h"
12 |
13 | @class RawAudioDataPlayer;
14 |
15 | @protocol DecapsulatingDelegate
16 |
17 | - (void)decapsulatingAndPlayingOver;
18 |
19 | @end
20 |
21 | @interface Decapsulator : NSObject {
22 | NSString *mFileName;
23 |
24 | BOOL isPlaying;
25 |
26 | NSOperationQueue *operationQueue;
27 |
28 | ogg_stream_state oggStreamState;
29 | ogg_sync_state oggSyncState;
30 | int packetNo;
31 | }
32 |
33 | @property (atomic, strong) RawAudioDataPlayer *player;
34 | @property (nonatomic, weak) id delegate;
35 |
36 | //生成对象
37 | - (id)initWithFileName:(NSString *)filename;
38 |
39 | - (void)play;
40 |
41 | - (void)stopPlaying;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Pod/Classes/Encapsulator.h:
--------------------------------------------------------------------------------
1 | //
2 | // Encapsulator.h
3 | // OggSpeex
4 | //
5 | // Created by Jiang Chuncheng on 6/25/13.
6 | // Copyright (c) 2013 Sense Force. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SpeexCodec.h"
11 |
12 | #define FRAME_SIZE 160 // PCM音频8khz*20ms -> 8000*0.02=160
13 |
14 | @class EncapsulatingOperation;
15 |
16 | @protocol EncapsulatingDelegate
17 |
18 | - (void)encapsulatingOver;
19 |
20 | @end
21 |
22 | @interface Encapsulator : NSObject {
23 |
24 | NSMutableData *bufferData; //用于ogg文件输出
25 | NSMutableData *tempData; //用于输入的pcm切割剩余
26 |
27 | NSMutableArray *pcmDatas;
28 |
29 | NSOperationQueue *operationQueue;
30 | EncapsulatingOperation *encapsulationOperation;
31 | NSString *mFileName;
32 |
33 | int mode;
34 | int sampleRate;
35 | int channels;
36 | int nframes;
37 | BOOL vbr;
38 | int streamSeraialNmber;
39 |
40 | BOOL moreDataInputing, isCanceled; //moreDataInputing是否继续封装;isCanceled,是否强制停止封装
41 |
42 | SpeexHeader speexHeader;
43 |
44 | id delegate;
45 |
46 | }
47 | //@property (atomic, retain) NSMutableData *bufferData;
48 | @property (assign) BOOL moreDataInputing, isCanceled;
49 | @property (readonly) SpeexHeader speexHeader;
50 | @property (readonly, retain) NSString *mFileName;
51 |
52 | @property (nonatomic, weak) id delegete;
53 |
54 | @property int mode;
55 | @property int sampleRate;
56 | @property int channels;
57 | @property int nframes;
58 | @property BOOL vbr;
59 |
60 | @property int streamSeraialNmber;
61 |
62 | void writeInt(unsigned char *dest, int offset, int value);
63 |
64 | void writeString(unsigned char *dest, int offset, unsigned char *value, int length);
65 |
66 | + (NSString *)defaultFileName;
67 |
68 | //生成对象
69 | - (id)initWithFileName:(NSString *)filename;
70 |
71 | - (void)resetWithFileName:(NSString *)filename;
72 |
73 | - (NSMutableData *)getBufferData;
74 |
75 | - (NSMutableArray *)getPCMDatas;
76 |
77 | //设置参数
78 | - (void)setMode:(int)_mode sampleRate:(int)_sampleRate channels:(int)_channels frames:(int)_nframes vbr:(BOOL)_vbr;
79 |
80 | //输入新PCM数据。注意数据同步
81 | - (void)inputPCMDataFromBuffer:(Byte *)buffer size:(UInt32)dataSize;
82 |
83 | //停止封装。是否强制结束未完成的封装
84 | - (void)stopEncapsulating:(BOOL)forceCancel;
85 |
86 | //为即将开始的封装做准备,包括写入ogg的头
87 | - (void)prepareForEncapsulating;
88 |
89 | @end
90 |
91 | @interface EncapsulatingOperation : NSOperation {
92 |
93 | Encapsulator *mParent;
94 |
95 | NSMutableArray *oggPeckets;
96 |
97 | ogg_stream_state oggStreamState;
98 | ogg_page oggPage;
99 |
100 | int isFirstInput;
101 | ogg_int64_t mPacketCount;
102 | ogg_int16_t mGranulepos;
103 | }
104 |
105 | @property (nonatomic, retain) Encapsulator *mParent;
106 |
107 | //初始化NSOperation
108 | - (id)initWithParent:(Encapsulator *)parent;
109 |
110 | //写入ogg的头以及comment
111 | - (void)writeHeaderWithComment:(NSString *)comment;
112 |
113 | //从编码好的数据中输出ogg packet
114 | - (void)inputOggPacketFromSpeexData:(NSData *)data;
115 |
116 | //检查packet是否足够生成一个page
117 | - (void)checkPageSufficient;
118 |
119 | //将页保存至文件并重置一些计数器。是否关闭文件。
120 | - (void)outputAPage:(BOOL)isHeaderOrComment endOfSteam:(BOOL)endOfStream;
121 |
122 | //将新的数据添加到音频文件末尾
123 | - (void)writeDataToFile:(NSData *)newData;
124 |
125 | @end
126 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/cb_search.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin & David Rowe */
2 | /**
3 | @file cb_search.h
4 | @brief Overlapped codebook search
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 |
35 | #ifndef CB_SEARCH_H
36 | #define CB_SEARCH_H
37 |
38 | #include "speex/speex_bits.h"
39 | #include "arch.h"
40 |
41 | /** Split codebook parameters. */
42 | typedef struct split_cb_params {
43 | int subvect_size;
44 | int nb_subvect;
45 | const signed char *shape_cb;
46 | int shape_bits;
47 | int have_sign;
48 | } split_cb_params;
49 |
50 |
51 | void split_cb_search_shape_sign(
52 | spx_word16_t target[], /* target vector */
53 | spx_coef_t ak[], /* LPCs for this subframe */
54 | spx_coef_t awk1[], /* Weighted LPCs for this subframe */
55 | spx_coef_t awk2[], /* Weighted LPCs for this subframe */
56 | const void *par, /* Codebook/search parameters */
57 | int p, /* number of LPC coeffs */
58 | int nsf, /* number of samples in subframe */
59 | spx_sig_t *exc,
60 | spx_word16_t *r,
61 | SpeexBits *bits,
62 | char *stack,
63 | int complexity,
64 | int update_target
65 | );
66 |
67 | void split_cb_shape_sign_unquant(
68 | spx_sig_t *exc,
69 | const void *par, /* non-overlapping codebook */
70 | int nsf, /* number of samples in subframe */
71 | SpeexBits *bits,
72 | char *stack,
73 | spx_int32_t *seed
74 | );
75 |
76 |
77 | void noise_codebook_quant(
78 | spx_word16_t target[], /* target vector */
79 | spx_coef_t ak[], /* LPCs for this subframe */
80 | spx_coef_t awk1[], /* Weighted LPCs for this subframe */
81 | spx_coef_t awk2[], /* Weighted LPCs for this subframe */
82 | const void *par, /* Codebook/search parameters */
83 | int p, /* number of LPC coeffs */
84 | int nsf, /* number of samples in subframe */
85 | spx_sig_t *exc,
86 | spx_word16_t *r,
87 | SpeexBits *bits,
88 | char *stack,
89 | int complexity,
90 | int update_target
91 | );
92 |
93 |
94 | void noise_codebook_unquant(
95 | spx_sig_t *exc,
96 | const void *par, /* non-overlapping codebook */
97 | int nsf, /* number of samples in subframe */
98 | SpeexBits *bits,
99 | char *stack,
100 | spx_int32_t *seed
101 | );
102 |
103 | #endif
104 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/cb_search_sse.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2004 Jean-Marc Valin */
2 | /**
3 | @file cb_search_sse.h
4 | @brief Fixed codebook functions (SSE version)
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 |
35 | #include
36 |
37 | static inline void _spx_mm_getr_ps (__m128 U, float *__Z, float *__Y, float *__X, float *__W)
38 | {
39 | union {
40 | float __a[4];
41 | __m128 __v;
42 | } __u;
43 |
44 | __u.__v = U;
45 |
46 | *__Z = __u.__a[0];
47 | *__Y = __u.__a[1];
48 | *__X = __u.__a[2];
49 | *__W = __u.__a[3];
50 |
51 | }
52 |
53 | #define OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK
54 | static void compute_weighted_codebook(const signed char *shape_cb, const spx_sig_t *_r, float *resp, __m128 *resp2, __m128 *E, int shape_cb_size, int subvect_size, char *stack)
55 | {
56 | int i, j, k;
57 | __m128 resj, EE;
58 | VARDECL(__m128 *r);
59 | VARDECL(__m128 *shape);
60 | ALLOC(r, subvect_size, __m128);
61 | ALLOC(shape, subvect_size, __m128);
62 | for(j=0;j>2] = EE;
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/exc_10_16_table.c:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin
2 | File: exc_10_16_table.c
3 | Codebook for excitation in narrowband CELP mode (3200 bps)
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 | - Neither the name of the Xiph.org Foundation nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 |
34 | const signed char exc_10_16_table[160] = {
35 | 22,39,14,44,11,35,-2,23,-4,6,
36 | 46,-28,13,-27,-23,12,4,20,-5,9,
37 | 37,-18,-23,23,0,9,-6,-20,4,-1,
38 | -17,-5,-4,17,0,1,9,-2,1,2,
39 | 2,-12,8,-25,39,15,9,16,-55,-11,
40 | 9,11,5,10,-2,-60,8,13,-6,11,
41 | -16,27,-47,-12,11,1,16,-7,9,-3,
42 | -29,9,-14,25,-19,34,36,12,40,-10,
43 | -3,-24,-14,-37,-21,-35,-2,-36,3,-6,
44 | 67,28,6,-17,-3,-12,-16,-15,-17,-7,
45 | -59,-36,-13,1,7,1,2,10,2,11,
46 | 13,10,8,-2,7,3,5,4,2,2,
47 | -3,-8,4,-5,6,7,-42,15,35,-2,
48 | -46,38,28,-20,-9,1,7,-3,0,-2,
49 | 0,0,0,0,0,0,0,0,0,0,
50 | -15,-28,52,32,5,-5,-17,-20,-10,-1};
51 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/exc_10_32_table.c:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin
2 | File: exc_10_32_table.c
3 | Codebook for excitation in narrowband CELP mode (4000 bps)
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 | - Neither the name of the Xiph.org Foundation nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 |
34 | const signed char exc_10_32_table[320] = {
35 | 7,17,17,27,25,22,12,4,-3,0,
36 | 28,-36,39,-24,-15,3,-9,15,-5,10,
37 | 31,-28,11,31,-21,9,-11,-11,-2,-7,
38 | -25,14,-22,31,4,-14,19,-12,14,-5,
39 | 4,-7,4,-5,9,0,-2,42,-47,-16,
40 | 1,8,0,9,23,-57,0,28,-11,6,
41 | -31,55,-45,3,-5,4,2,-2,4,-7,
42 | -3,6,-2,7,-3,12,5,8,54,-10,
43 | 8,-7,-8,-24,-25,-27,-14,-5,8,5,
44 | 44,23,5,-9,-11,-11,-13,-9,-12,-8,
45 | -29,-8,-22,6,-15,3,-12,-1,-5,-3,
46 | 34,-1,29,-16,17,-4,12,2,1,4,
47 | -2,-4,2,-1,11,-3,-52,28,30,-9,
48 | -32,25,44,-20,-24,4,6,-1,0,0,
49 | 0,0,0,0,0,0,0,0,0,0,
50 | -25,-10,22,29,13,-13,-22,-13,-4,0,
51 | -4,-16,10,15,-36,-24,28,25,-1,-3,
52 | 66,-33,-11,-15,6,0,3,4,-2,5,
53 | 24,-20,-47,29,19,-2,-4,-1,0,-1,
54 | -2,3,1,8,-11,5,5,-57,28,28,
55 | 0,-16,4,-4,12,-6,-1,2,-20,61,
56 | -9,24,-22,-42,29,6,17,8,4,2,
57 | -65,15,8,10,5,6,5,3,2,-2,
58 | -3,5,-9,4,-5,23,13,23,-3,-63,
59 | 3,-5,-4,-6,0,-3,23,-36,-46,9,
60 | 5,5,8,4,9,-5,1,-3,10,1,
61 | -6,10,-11,24,-47,31,22,-12,14,-10,
62 | 6,11,-7,-7,7,-31,51,-12,-6,7,
63 | 6,-17,9,-11,-20,52,-19,3,-6,-6,
64 | -8,-5,23,-41,37,1,-21,10,-14,8,
65 | 7,5,-15,-15,23,39,-26,-33,7,2,
66 | -32,-30,-21,-8,4,12,17,15,14,11};
67 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/exc_20_32_table.c:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin
2 | File: exc_20_32_table.c
3 | Codebook for excitation in narrowband CELP mode (2000 bps)
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 | - Neither the name of the Xiph.org Foundation nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 |
34 | const signed char exc_20_32_table[640] = {
35 | 12,32,25,46,36,33,9,14,-3,6,1,-8,0,-10,-5,-7,-7,-7,-5,-5,
36 | 31,-27,24,-32,-4,10,-11,21,-3,19,23,-9,22,24,-10,-1,-10,-13,-7,-11,
37 | 42,-33,31,19,-8,0,-10,-16,1,-21,-17,10,-8,14,8,4,11,-2,5,-2,
38 | -33,11,-16,33,11,-4,9,-4,11,2,6,-5,8,-5,11,-4,-6,26,-36,-16,
39 | 0,4,-2,-8,12,6,-1,34,-46,-22,9,9,21,9,5,-66,-5,26,2,10,
40 | 13,2,19,9,12,-81,3,13,13,0,-14,22,-35,6,-7,-4,6,-6,10,-6,
41 | -31,38,-33,0,-10,-11,5,-12,12,-17,5,0,-6,13,-9,10,8,25,33,2,
42 | -12,8,-6,10,-2,21,7,17,43,5,11,-7,-9,-20,-36,-20,-23,-4,-4,-3,
43 | 27,-9,-9,-49,-39,-38,-11,-9,6,5,23,25,5,3,3,4,1,2,-3,-1,
44 | 87,39,17,-21,-9,-19,-9,-15,-13,-14,-17,-11,-10,-11,-8,-6,-1,-3,-3,-1,
45 | -54,-34,-27,-8,-11,-4,-5,0,0,4,8,6,9,7,9,7,6,5,5,5,
46 | 48,10,19,-10,12,-1,9,-3,2,5,-3,2,-2,-2,0,-2,-26,6,9,-7,
47 | -16,-9,2,7,7,-5,-43,11,22,-11,-9,34,37,-15,-13,-6,1,-1,1,1,
48 | -64,56,52,-11,-27,5,4,3,1,2,1,3,-1,-4,-4,-10,-7,-4,-4,2,
49 | -1,-7,-7,-12,-10,-15,-9,-5,-5,-11,-16,-13,6,16,4,-13,-16,-10,-4,2,
50 | -47,-13,25,47,19,-14,-20,-8,-17,0,-3,-13,1,6,-17,-14,15,1,10,6,
51 | -24,0,-10,19,-69,-8,14,49,17,-5,33,-29,3,-4,0,2,-8,5,-6,2,
52 | 120,-56,-12,-47,23,-9,6,-5,1,2,-5,1,-10,4,-1,-1,4,-1,0,-3,
53 | 30,-52,-67,30,22,11,-1,-4,3,0,7,2,0,1,-10,-4,-8,-13,5,1,
54 | 1,-1,5,13,-9,-3,-10,-62,22,48,-4,-6,2,3,5,1,1,4,1,13,
55 | 3,-20,10,-9,13,-2,-4,9,-20,44,-1,20,-32,-67,19,0,28,11,8,2,
56 | -11,15,-19,-53,31,2,34,10,6,-4,-58,8,10,13,14,1,12,2,0,0,
57 | -128,37,-8,44,-9,26,-3,18,2,6,11,-1,9,1,5,3,0,1,1,2,
58 | 12,3,-2,-3,7,25,9,18,-6,-37,3,-8,-16,3,-10,-7,17,-34,-44,11,
59 | 17,-15,-3,-16,-1,-13,11,-46,-65,-2,8,13,2,4,4,5,15,5,9,6,
60 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
61 | -9,19,-12,12,-28,38,29,-1,12,2,5,23,-10,3,4,-15,21,-4,3,3,
62 | 6,17,-9,-4,-8,-20,26,5,-10,6,1,-19,18,-15,-12,47,-6,-2,-7,-9,
63 | -1,-17,-2,-2,-14,30,-14,2,-7,-4,-1,-12,11,-25,16,-3,-12,11,-7,7,
64 | -17,1,19,-28,31,-7,-10,7,-10,3,12,5,-16,6,24,41,-29,-54,0,1,
65 | 7,-1,5,-6,13,10,-4,-8,8,-9,-27,-53,-38,-1,10,19,17,16,12,12,
66 | 0,3,-7,-4,13,12,-31,-14,6,-5,3,5,17,43,50,25,10,1,-6,-2};
67 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/exc_5_64_table.c:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin
2 | File: exc_5_64_table.c
3 | Codebook for excitation in narrowband CELP mode (9600 bps)
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 | - Neither the name of the Xiph.org Foundation nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 |
34 | const signed char exc_5_64_table[320]={
35 | 1,5,-15,49,-66,
36 | -48,-4,50,-44,7,
37 | 37,16,-18,25,-26,
38 | -26,-15,19,19,-27,
39 | -47,28,57,5,-17,
40 | -32,-41,68,21,-2,
41 | 64,56,8,-16,-13,
42 | -26,-9,-16,11,6,
43 | -39,25,-19,22,-31,
44 | 20,-45,55,-43,10,
45 | -16,47,-40,40,-20,
46 | -51,3,-17,-14,-15,
47 | -24,53,-20,-46,46,
48 | 27,-68,32,3,-18,
49 | -5,9,-31,16,-9,
50 | -10,-1,-23,48,95,
51 | 47,25,-41,-32,-3,
52 | 15,-25,-55,36,41,
53 | -27,20,5,13,14,
54 | -22,5,2,-23,18,
55 | 46,-15,17,-18,-34,
56 | -5,-8,27,-55,73,
57 | 16,2,-1,-17,40,
58 | -78,33,0,2,19,
59 | 4,53,-16,-15,-16,
60 | -28,-3,-13,49,8,
61 | -7,-29,27,-13,32,
62 | 20,32,-61,16,14,
63 | 41,44,40,24,20,
64 | 7,4,48,-60,-77,
65 | 17,-6,-48,65,-15,
66 | 32,-30,-71,-10,-3,
67 | -6,10,-2,-7,-29,
68 | -56,67,-30,7,-5,
69 | 86,-6,-10,0,5,
70 | -31,60,34,-38,-3,
71 | 24,10,-2,30,23,
72 | 24,-41,12,70,-43,
73 | 15,-17,6,13,16,
74 | -13,8,30,-15,-8,
75 | 5,23,-34,-98,-4,
76 | -13,13,-48,-31,70,
77 | 12,31,25,24,-24,
78 | 26,-7,33,-16,8,
79 | 5,-11,-14,-8,-65,
80 | 13,10,-2,-9,0,
81 | -3,-68,5,35,7,
82 | 0,-31,-1,-17,-9,
83 | -9,16,-37,-18,-1,
84 | 69,-48,-28,22,-21,
85 | -11,5,49,55,23,
86 | -86,-36,16,2,13,
87 | 63,-51,30,-11,13,
88 | 24,-18,-6,14,-19,
89 | 1,41,9,-5,27,
90 | -36,-44,-34,-37,-21,
91 | -26,31,-39,15,43,
92 | 5,-8,29,20,-8,
93 | -20,-52,-28,-1,13,
94 | 26,-34,-10,-9,27,
95 | -8,8,27,-66,4,
96 | 12,-22,49,10,-77,
97 | 32,-18,3,-38,12,
98 | -3,-1,2,2,0};
99 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/fftwrap.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2005 Jean-Marc Valin
2 | File: fftwrap.h
3 |
4 | Wrapper for various FFTs
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 the Xiph.org Foundation nor the names of its
18 | contributors may be used to endorse or promote products derived from
19 | this software without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 |
33 | */
34 |
35 | #ifndef FFTWRAP_H
36 | #define FFTWRAP_H
37 |
38 | #include "arch.h"
39 |
40 | /** Compute tables for an FFT */
41 | void *spx_fft_init(int size);
42 |
43 | /** Destroy tables for an FFT */
44 | void spx_fft_destroy(void *table);
45 |
46 | /** Forward (real to half-complex) transform */
47 | void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out);
48 |
49 | /** Backward (half-complex to real) transform */
50 | void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out);
51 |
52 | /** Forward (real to half-complex) transform of float data */
53 | void spx_fft_float(void *table, float *in, float *out);
54 |
55 | /** Backward (half-complex to real) transform of float data */
56 | void spx_ifft_float(void *table, float *in, float *out);
57 |
58 | #endif
59 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/filterbank.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2006 Jean-Marc Valin */
2 | /**
3 | @file filterbank.h
4 | @brief Converting between psd and filterbank
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions are
9 | met:
10 |
11 | 1. Redistributions of source code must retain the above copyright notice,
12 | this list of conditions and the following disclaimer.
13 |
14 | 2. Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | 3. The name of the author may not be used to endorse or promote products
19 | derived from this software without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 | POSSIBILITY OF SUCH DAMAGE.
32 | */
33 |
34 | #ifndef FILTERBANK_H
35 | #define FILTERBANK_H
36 |
37 | #include "arch.h"
38 |
39 | typedef struct {
40 | int *bank_left;
41 | int *bank_right;
42 | spx_word16_t *filter_left;
43 | spx_word16_t *filter_right;
44 | #ifndef FIXED_POINT
45 | float *scaling;
46 | #endif
47 | int nb_banks;
48 | int len;
49 | } FilterBank;
50 |
51 |
52 | FilterBank *filterbank_new(int banks, spx_word32_t sampling, int len, int type);
53 |
54 | void filterbank_destroy(FilterBank *bank);
55 |
56 | void filterbank_compute_bank32(FilterBank *bank, spx_word32_t *ps, spx_word32_t *mel);
57 |
58 | void filterbank_compute_psd16(FilterBank *bank, spx_word16_t *mel, spx_word16_t *psd);
59 |
60 | #ifndef FIXED_POINT
61 | void filterbank_compute_bank(FilterBank *bank, float *psd, float *mel);
62 | void filterbank_compute_psd(FilterBank *bank, float *mel, float *psd);
63 | #endif
64 |
65 |
66 | #endif
67 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/filters.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin */
2 | /**
3 | @file filters.h
4 | @brief Various analysis/synthesis filters
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 |
35 | #ifndef FILTERS_H
36 | #define FILTERS_H
37 |
38 | #include "arch.h"
39 |
40 | spx_word16_t compute_rms(const spx_sig_t *x, int len);
41 | spx_word16_t compute_rms16(const spx_word16_t *x, int len);
42 | void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len);
43 | void signal_div(const spx_word16_t *x, spx_word16_t *y, spx_word32_t scale, int len);
44 |
45 | #ifdef FIXED_POINT
46 |
47 | int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len);
48 |
49 | #endif
50 |
51 |
52 | #define HIGHPASS_NARROWBAND 0
53 | #define HIGHPASS_WIDEBAND 2
54 | #define HIGHPASS_INPUT 0
55 | #define HIGHPASS_OUTPUT 1
56 | #define HIGHPASS_IRS 4
57 |
58 | void highpass(const spx_word16_t *x, spx_word16_t *y, int len, int filtID, spx_mem_t *mem);
59 |
60 |
61 | void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_word16_t *, spx_word16_t *y2, int N, int M, spx_word16_t *mem, char *stack);
62 | void qmf_synth(const spx_word16_t *x1, const spx_word16_t *x2, const spx_word16_t *a, spx_word16_t *y, int N, int M, spx_word16_t *mem1, spx_word16_t *mem2, char *stack);
63 |
64 | void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
65 | void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
66 | void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
67 |
68 | /* Apply bandwidth expansion on LPC coef */
69 | void bw_lpc(spx_word16_t , const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order);
70 | void sanitize_values32(spx_word32_t *vec, spx_word32_t min_val, spx_word32_t max_val, int len);
71 |
72 |
73 | void syn_percep_zero16(const spx_word16_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack);
74 | void residue_percep_zero16(const spx_word16_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack);
75 |
76 | void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack);
77 |
78 | void multicomb(
79 | spx_word16_t *exc, /*decoded excitation*/
80 | spx_word16_t *new_exc, /*enhanced excitation*/
81 | spx_coef_t *ak, /*LPC filter coefs*/
82 | int p, /*LPC order*/
83 | int nsf, /*sub-frame size*/
84 | int pitch, /*pitch period*/
85 | int max_pitch, /*pitch gain (3-tap)*/
86 | spx_word16_t comb_gain, /*gain of comb filter*/
87 | char *stack
88 | );
89 |
90 | #endif
91 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/filters_arm4.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2004 Jean-Marc Valin */
2 | /**
3 | @file filters_arm4.h
4 | @brief Various analysis/synthesis filters (ARM4 version)
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 |
35 | #define OVERRIDE_NORMALIZE16
36 | int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len)
37 | {
38 | spx_sig_t max_val=1;
39 | int sig_shift;
40 | int dead1, dead2, dead3, dead4, dead5, dead6;
41 |
42 | __asm__ __volatile__ (
43 | "\tmov %1, #1 \n"
44 | "\tmov %3, #0 \n"
45 |
46 | ".normalize16loop1%=: \n"
47 |
48 | "\tldr %4, [%0], #4 \n"
49 | "\tcmps %4, %1 \n"
50 | "\tmovgt %1, %4 \n"
51 | "\tcmps %4, %3 \n"
52 | "\tmovlt %3, %4 \n"
53 |
54 | "\tsubs %2, %2, #1 \n"
55 | "\tbne .normalize16loop1%=\n"
56 |
57 | "\trsb %3, %3, #0 \n"
58 | "\tcmp %1, %3 \n"
59 | "\tmovlt %1, %3 \n"
60 | : "=r" (dead1), "=r" (max_val), "=r" (dead3), "=r" (dead4),
61 | "=r" (dead5), "=r" (dead6)
62 | : "0" (x), "2" (len)
63 | : "cc");
64 |
65 | sig_shift=0;
66 | while (max_val>max_scale)
67 | {
68 | sig_shift++;
69 | max_val >>= 1;
70 | }
71 |
72 | __asm__ __volatile__ (
73 | ".normalize16loop%=: \n"
74 |
75 | "\tldr %4, [%0], #4 \n"
76 | "\tldr %5, [%0], #4 \n"
77 | "\tmov %4, %4, asr %3 \n"
78 | "\tstrh %4, [%1], #2 \n"
79 | "\tldr %4, [%0], #4 \n"
80 | "\tmov %5, %5, asr %3 \n"
81 | "\tstrh %5, [%1], #2 \n"
82 | "\tldr %5, [%0], #4 \n"
83 | "\tmov %4, %4, asr %3 \n"
84 | "\tstrh %4, [%1], #2 \n"
85 | "\tsubs %2, %2, #1 \n"
86 | "\tmov %5, %5, asr %3 \n"
87 | "\tstrh %5, [%1], #2 \n"
88 |
89 | "\tbgt .normalize16loop%=\n"
90 | : "=r" (dead1), "=r" (dead2), "=r" (dead3), "=r" (dead4),
91 | "=r" (dead5), "=r" (dead6)
92 | : "0" (x), "1" (y), "2" (len>>2), "3" (sig_shift)
93 | : "cc", "memory");
94 | return sig_shift;
95 | }
96 |
97 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/gain_table_lbr.c:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin
2 | File: gain_table_lbr.c
3 | Codebook for 3-tap pitch prediction gain (32 entries)
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are
7 | met:
8 |
9 | 1. Redistributions of source code must retain the above copyright notice,
10 | this list of conditions and the following disclaimer.
11 |
12 | 2. 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 | 3. The name of the author may not be used to endorse or promote products
17 | derived from this software without specific prior written permission.
18 |
19 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
23 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 | POSSIBILITY OF SUCH DAMAGE.
30 | */
31 |
32 | const signed char gain_cdbk_lbr[128] = {
33 | -32, -32, -32, 0,
34 | -31, -58, -16, 22,
35 | -41, -24, -43, 14,
36 | -56, -22, -55, 29,
37 | -13, 33, -41, 47,
38 | -4, -39, -9, 29,
39 | -41, 15, -12, 38,
40 | -8, -15, -12, 31,
41 | 1, 2, -44, 40,
42 | -22, -66, -42, 27,
43 | -38, 28, -23, 38,
44 | -21, 14, -37, 31,
45 | 0, 21, -50, 52,
46 | -53, -71, -27, 33,
47 | -37, -1, -19, 25,
48 | -19, -5, -28, 22,
49 | 6, 65, -44, 74,
50 | -33, -48, -33, 9,
51 | -40, 57, -14, 58,
52 | -17, 4, -45, 32,
53 | -31, 38, -33, 36,
54 | -23, 28, -40, 39,
55 | -43, 29, -12, 46,
56 | -34, 13, -23, 28,
57 | -16, 15, -27, 34,
58 | -14, -82, -15, 43,
59 | -31, 25, -32, 29,
60 | -21, 5, -5, 38,
61 | -47, -63, -51, 33,
62 | -46, 12, 3, 47,
63 | -28, -17, -29, 11,
64 | -10, 14, -40, 38};
65 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/hexc_10_32_table.c:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin
2 | File: hexc_10_32_table.c
3 | Codebook for high-band excitation in SB-CELP mode (4000 bps)
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 | - Neither the name of the Xiph.org Foundation nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | const signed char hexc_10_32_table[320] = {
34 | -3, -2, -1, 0, -4, 5, 35, -40, -9, 13,
35 | -44, 5, -27, -1, -7, 6, -11, 7, -8, 7,
36 | 19, -14, 15, -4, 9, -10, 10, -8, 10, -9,
37 | -1, 1, 0, 0, 2, 5, -18, 22, -53, 50,
38 | 1, -23, 50, -36, 15, 3, -13, 14, -10, 6,
39 | 1, 5, -3, 4, -2, 5, -32, 25, 5, -2,
40 | -1, -4, 1, 11, -29, 26, -6, -15, 30, -18,
41 | 0, 15, -17, 40, -41, 3, 9, -2, -2, 3,
42 | -3, -1, -5, 2, 21, -6, -16, -21, 23, 2,
43 | 60, 15, 16, -16, -9, 14, 9, -1, 7, -9,
44 | 0, 1, 1, 0, -1, -6, 17, -28, 54, -45,
45 | -1, 1, -1, -6, -6, 2, 11, 26, -29, -2,
46 | 46, -21, 34, 12, -23, 32, -23, 16, -10, 3,
47 | 66, 19, -20, 24, 7, 11, -3, 0, -3, -1,
48 | -50, -46, 2, -18, -3, 4, -1, -2, 3, -3,
49 | -19, 41, -36, 9, 11, -24, 21, -16, 9, -3,
50 | -25, -3, 10, 18, -9, -2, -5, -1, -5, 6,
51 | -4, -3, 2, -26, 21, -19, 35, -15, 7, -13,
52 | 17, -19, 39, -43, 48, -31, 16, -9, 7, -2,
53 | -5, 3, -4, 9, -19, 27, -55, 63, -35, 10,
54 | 26, -44, -2, 9, 4, 1, -6, 8, -9, 5,
55 | -8, -1, -3, -16, 45, -42, 5, 15, -16, 10,
56 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
57 | -16, 24, -55, 47, -38, 27, -19, 7, -3, 1,
58 | 16, 27, 20, -19, 18, 5, -7, 1, -5, 2,
59 | -6, 8, -22, 0, -3, -3, 8, -1, 7, -8,
60 | 1, -3, 5, 0, 17, -48, 58, -52, 29, -7,
61 | -2, 3, -10, 6, -26, 58, -31, 1, -6, 3,
62 | 93, -29, 39, 3, 17, 5, 6, -1, -1, -1,
63 | 27, 13, 10, 19, -7, -34, 12, 10, -4, 9,
64 | -76, 9, 8, -28, -2, -11, 2, -1, 3, 1,
65 | -83, 38, -39, 4, -16, -6, -2, -5, 5, -2,
66 | };
67 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/kiss_fft.h:
--------------------------------------------------------------------------------
1 | #ifndef KISS_FFT_H
2 | #define KISS_FFT_H
3 |
4 | #include
5 | #include
6 | #include "arch.h"
7 |
8 | #ifdef __cplusplus
9 | extern "C" {
10 | #endif
11 |
12 | /*
13 | ATTENTION!
14 | If you would like a :
15 | -- a utility that will handle the caching of fft objects
16 | -- real-only (no imaginary time component ) FFT
17 | -- a multi-dimensional FFT
18 | -- a command-line utility to perform ffts
19 | -- a command-line utility to perform fast-convolution filtering
20 |
21 | Then see kfc.h kiss_fftr.h kiss_fftnd.h fftutil.c kiss_fastfir.c
22 | in the tools/ directory.
23 | */
24 |
25 | #ifdef USE_SIMD
26 | # include
27 | # define kiss_fft_scalar __m128
28 | #define KISS_FFT_MALLOC(nbytes) memalign(16,nbytes)
29 | #else
30 | #define KISS_FFT_MALLOC speex_alloc
31 | #endif
32 |
33 |
34 | #ifdef FIXED_POINT
35 | #include "arch.h"
36 | # define kiss_fft_scalar spx_int16_t
37 | #else
38 | # ifndef kiss_fft_scalar
39 | /* default is float */
40 | # define kiss_fft_scalar float
41 | # endif
42 | #endif
43 |
44 | typedef struct {
45 | kiss_fft_scalar r;
46 | kiss_fft_scalar i;
47 | }kiss_fft_cpx;
48 |
49 | typedef struct kiss_fft_state* kiss_fft_cfg;
50 |
51 | /*
52 | * kiss_fft_alloc
53 | *
54 | * Initialize a FFT (or IFFT) algorithm's cfg/state buffer.
55 | *
56 | * typical usage: kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL);
57 | *
58 | * The return value from fft_alloc is a cfg buffer used internally
59 | * by the fft routine or NULL.
60 | *
61 | * If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc.
62 | * The returned value should be free()d when done to avoid memory leaks.
63 | *
64 | * The state can be placed in a user supplied buffer 'mem':
65 | * If lenmem is not NULL and mem is not NULL and *lenmem is large enough,
66 | * then the function places the cfg in mem and the size used in *lenmem
67 | * and returns mem.
68 | *
69 | * If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough),
70 | * then the function returns NULL and places the minimum cfg
71 | * buffer size in *lenmem.
72 | * */
73 |
74 | kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem);
75 |
76 | /*
77 | * kiss_fft(cfg,in_out_buf)
78 | *
79 | * Perform an FFT on a complex input buffer.
80 | * for a forward FFT,
81 | * fin should be f[0] , f[1] , ... ,f[nfft-1]
82 | * fout will be F[0] , F[1] , ... ,F[nfft-1]
83 | * Note that each element is complex and can be accessed like
84 | f[k].r and f[k].i
85 | * */
86 | void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);
87 |
88 | /*
89 | A more generic version of the above function. It reads its input from every Nth sample.
90 | * */
91 | void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride);
92 |
93 | /* If kiss_fft_alloc allocated a buffer, it is one contiguous
94 | buffer and can be simply free()d when no longer needed*/
95 | #define kiss_fft_free speex_free
96 |
97 | /*
98 | Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up
99 | your compiler output to call this before you exit.
100 | */
101 | void kiss_fft_cleanup(void);
102 |
103 |
104 | #ifdef __cplusplus
105 | }
106 | #endif
107 |
108 | #endif
109 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/kiss_fftr.h:
--------------------------------------------------------------------------------
1 | #ifndef KISS_FTR_H
2 | #define KISS_FTR_H
3 |
4 | #include "kiss_fft.h"
5 | #ifdef __cplusplus
6 | extern "C" {
7 | #endif
8 |
9 |
10 | /*
11 |
12 | Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
13 |
14 |
15 |
16 | */
17 |
18 | typedef struct kiss_fftr_state *kiss_fftr_cfg;
19 |
20 |
21 | kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
22 | /*
23 | nfft must be even
24 |
25 | If you don't care to allocate space, use mem = lenmem = NULL
26 | */
27 |
28 |
29 | void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
30 | /*
31 | input timedata has nfft scalar points
32 | output freqdata has nfft/2+1 complex points
33 | */
34 |
35 | void kiss_fftr2(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata);
36 |
37 | void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
38 |
39 | void kiss_fftri2(kiss_fftr_cfg st,const kiss_fft_scalar *freqdata, kiss_fft_scalar *timedata);
40 |
41 | /*
42 | input freqdata has nfft/2+1 complex points
43 | output timedata has nfft scalar points
44 | */
45 |
46 | #define kiss_fftr_free speex_free
47 |
48 | #ifdef __cplusplus
49 | }
50 | #endif
51 | #endif
52 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/lpc.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin */
2 | /**
3 | @file lpc.h
4 | @brief Functions for LPC (Linear Prediction Coefficients) analysis
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 |
35 | #ifndef LPC_H
36 | #define LPC_H
37 |
38 | #include "arch.h"
39 |
40 | void _spx_autocorr(
41 | const spx_word16_t * x, /* in: [0...n-1] samples x */
42 | spx_word16_t *ac, /* out: [0...lag-1] ac values */
43 | int lag, int n);
44 |
45 | spx_word32_t /* returns minimum mean square error */
46 | _spx_lpc(
47 | spx_coef_t * lpc, /* [0...p-1] LPC coefficients */
48 | const spx_word16_t * ac, /* in: [0...p] autocorrelation values */
49 | int p
50 | );
51 |
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/lsp.h:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------*\
2 | Original Copyright
3 | FILE........: AK2LSPD.H
4 | TYPE........: Turbo C header file
5 | COMPANY.....: Voicetronix
6 | AUTHOR......: James Whitehall
7 | DATE CREATED: 21/11/95
8 |
9 | Modified by Jean-Marc Valin
10 |
11 | This file contains functions for converting Linear Prediction
12 | Coefficients (LPC) to Line Spectral Pair (LSP) and back. Note that the
13 | LSP coefficients are not in radians format but in the x domain of the
14 | unit circle.
15 |
16 | \*---------------------------------------------------------------------------*/
17 | /**
18 | @file lsp.h
19 | @brief Line Spectral Pair (LSP) functions.
20 | */
21 | /* Speex License:
22 |
23 | Redistribution and use in source and binary forms, with or without
24 | modification, are permitted provided that the following conditions
25 | are met:
26 |
27 | - Redistributions of source code must retain the above copyright
28 | notice, this list of conditions and the following disclaimer.
29 |
30 | - Redistributions in binary form must reproduce the above copyright
31 | notice, this list of conditions and the following disclaimer in the
32 | documentation and/or other materials provided with the distribution.
33 |
34 | - Neither the name of the Xiph.org Foundation nor the names of its
35 | contributors may be used to endorse or promote products derived from
36 | this software without specific prior written permission.
37 |
38 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
39 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
40 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
41 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
42 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
43 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
44 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
45 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
46 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
47 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
48 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49 | */
50 |
51 | #ifndef __AK2LSPD__
52 | #define __AK2LSPD__
53 |
54 | #include "arch.h"
55 |
56 | int lpc_to_lsp (spx_coef_t *a, int lpcrdr, spx_lsp_t *freq, int nb, spx_word16_t delta, char *stack);
57 | void lsp_to_lpc(spx_lsp_t *freq, spx_coef_t *ak, int lpcrdr, char *stack);
58 |
59 | /*Added by JMV*/
60 | void lsp_enforce_margin(spx_lsp_t *lsp, int len, spx_word16_t margin);
61 |
62 | void lsp_interpolate(spx_lsp_t *old_lsp, spx_lsp_t *new_lsp, spx_lsp_t *interp_lsp, int len, int subframe, int nb_subframes);
63 |
64 | #endif /* __AK2LSPD__ */
65 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/lsp_bfin.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2006 David Rowe */
2 | /**
3 | @file lsp_bfin.h
4 | @author David Rowe
5 | @brief LSP routines optimised for the Blackfin
6 | */
7 | /*
8 | Redistribution and use in source and binary forms, with or without
9 | modification, are permitted provided that the following conditions
10 | are met:
11 |
12 | - Redistributions of source code must retain the above copyright
13 | notice, this list of conditions and the following disclaimer.
14 |
15 | - Redistributions in binary form must reproduce the above copyright
16 | notice, this list of conditions and the following disclaimer in the
17 | documentation and/or other materials provided with the distribution.
18 |
19 | - Neither the name of the Xiph.org Foundation nor the names of its
20 | contributors may be used to endorse or promote products derived from
21 | this software without specific prior written permission.
22 |
23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 | */
35 |
36 | #define OVERRIDE_CHEB_POLY_EVA
37 | #ifdef OVERRIDE_CHEB_POLY_EVA
38 | static inline spx_word32_t cheb_poly_eva(
39 | spx_word16_t *coef, /* P or Q coefs in Q13 format */
40 | spx_word16_t x, /* cos of freq (-1.0 to 1.0) in Q14 format */
41 | int m, /* LPC order/2 */
42 | char *stack
43 | )
44 | {
45 | spx_word32_t sum;
46 |
47 | __asm__ __volatile__
48 | (
49 | "P0 = %2;\n\t" /* P0: coef[m], coef[m-1],..., coef[0] */
50 | "R4 = 8192;\n\t" /* R4: rounding constant */
51 | "R2 = %1;\n\t" /* R2: x */
52 |
53 | "R5 = -16383;\n\t"
54 | "R2 = MAX(R2,R5);\n\t"
55 | "R5 = 16383;\n\t"
56 | "R2 = MIN(R2,R5);\n\t"
57 |
58 | "R3 = W[P0--] (X);\n\t" /* R3: sum */
59 | "R5 = W[P0--] (X);\n\t"
60 | "R5 = R5.L * R2.L (IS);\n\t"
61 | "R5 = R5 + R4;\n\t"
62 | "R5 >>>= 14;\n\t"
63 | "R3 = R3 + R5;\n\t"
64 |
65 | "R0 = R2;\n\t" /* R0: b0 */
66 | "R1 = 16384;\n\t" /* R1: b1 */
67 | "LOOP cpe%= LC0 = %3;\n\t"
68 | "LOOP_BEGIN cpe%=;\n\t"
69 | "P1 = R0;\n\t"
70 | "R0 = R2.L * R0.L (IS) || R5 = W[P0--] (X);\n\t"
71 | "R0 >>>= 13;\n\t"
72 | "R0 = R0 - R1;\n\t"
73 | "R1 = P1;\n\t"
74 | "R5 = R5.L * R0.L (IS);\n\t"
75 | "R5 = R5 + R4;\n\t"
76 | "R5 >>>= 14;\n\t"
77 | "R3 = R3 + R5;\n\t"
78 | "LOOP_END cpe%=;\n\t"
79 | "%0 = R3;\n\t"
80 | : "=&d" (sum)
81 | : "a" (x), "a" (&coef[m]), "a" (m-1)
82 | : "R0", "R1", "R3", "R2", "R4", "R5", "P0", "P1"
83 | );
84 | return sum;
85 | }
86 | #endif
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/ltp_sse.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin */
2 | /**
3 | @file ltp_sse.h
4 | @brief Long-Term Prediction functions (SSE version)
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 |
35 | #include
36 |
37 | #define OVERRIDE_INNER_PROD
38 | float inner_prod(const float *a, const float *b, int len)
39 | {
40 | int i;
41 | float ret;
42 | __m128 sum = _mm_setzero_ps();
43 | for (i=0;i<(len>>2);i+=2)
44 | {
45 | sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a+0), _mm_loadu_ps(b+0)));
46 | sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a+4), _mm_loadu_ps(b+4)));
47 | a += 8;
48 | b += 8;
49 | }
50 | sum = _mm_add_ps(sum, _mm_movehl_ps(sum, sum));
51 | sum = _mm_add_ss(sum, _mm_shuffle_ps(sum, sum, 0x55));
52 | _mm_store_ss(&ret, sum);
53 | return ret;
54 | }
55 |
56 | #define OVERRIDE_PITCH_XCORR
57 | void pitch_xcorr(const float *_x, const float *_y, float *corr, int len, int nb_pitch, char *stack)
58 | {
59 | int i, offset;
60 | VARDECL(__m128 *x);
61 | VARDECL(__m128 *y);
62 | int N, L;
63 | N = len>>2;
64 | L = nb_pitch>>2;
65 | ALLOC(x, N, __m128);
66 | ALLOC(y, N+L, __m128);
67 | for (i=0;i>2)-1), "0" (src), "1" (dest)
51 | : "R0", "I0", "L0", "memory"
52 | );
53 | return dest;
54 | }
55 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/quant_lsp.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin */
2 | /**
3 | @file quant_lsp.h
4 | @brief LSP vector quantization
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 |
35 | #ifndef QUANT_LSP_H
36 | #define QUANT_LSP_H
37 |
38 | #include "speex/speex_bits.h"
39 | #include "arch.h"
40 |
41 | #define MAX_LSP_SIZE 20
42 |
43 | #define NB_CDBK_SIZE 64
44 | #define NB_CDBK_SIZE_LOW1 64
45 | #define NB_CDBK_SIZE_LOW2 64
46 | #define NB_CDBK_SIZE_HIGH1 64
47 | #define NB_CDBK_SIZE_HIGH2 64
48 |
49 | /*Narrowband codebooks*/
50 | extern const signed char cdbk_nb[];
51 | extern const signed char cdbk_nb_low1[];
52 | extern const signed char cdbk_nb_low2[];
53 | extern const signed char cdbk_nb_high1[];
54 | extern const signed char cdbk_nb_high2[];
55 |
56 | /* Quantizes narrowband LSPs with 30 bits */
57 | void lsp_quant_nb(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits);
58 |
59 | /* Decodes quantized narrowband LSPs */
60 | void lsp_unquant_nb(spx_lsp_t *lsp, int order, SpeexBits *bits);
61 |
62 | /* Quantizes low bit-rate narrowband LSPs with 18 bits */
63 | void lsp_quant_lbr(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits);
64 |
65 | /* Decodes quantized low bit-rate narrowband LSPs */
66 | void lsp_unquant_lbr(spx_lsp_t *lsp, int order, SpeexBits *bits);
67 |
68 | /* Quantizes high-band LSPs with 12 bits */
69 | void lsp_quant_high(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits);
70 |
71 | /* Decodes high-band LSPs */
72 | void lsp_unquant_high(spx_lsp_t *lsp, int order, SpeexBits *bits);
73 |
74 | #endif
75 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/smallft.h:
--------------------------------------------------------------------------------
1 | /********************************************************************
2 | * *
3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
7 | * *
8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
9 | * by the XIPHOPHORUS Company http://www.xiph.org/ *
10 | * *
11 | ********************************************************************
12 |
13 | function: fft transform
14 | last mod: $Id: smallft.h,v 1.3 2003/09/16 18:35:45 jm Exp $
15 |
16 | ********************************************************************/
17 | /**
18 | @file smallft.h
19 | @brief Discrete Rotational Fourier Transform (DRFT)
20 | */
21 |
22 | #ifndef _V_SMFT_H_
23 | #define _V_SMFT_H_
24 |
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | /** Discrete Rotational Fourier Transform lookup */
31 | struct drft_lookup{
32 | int n;
33 | float *trigcache;
34 | int *splitcache;
35 | };
36 |
37 | extern void spx_drft_forward(struct drft_lookup *l,float *data);
38 | extern void spx_drft_backward(struct drft_lookup *l,float *data);
39 | extern void spx_drft_init(struct drft_lookup *l,int n);
40 | extern void spx_drft_clear(struct drft_lookup *l);
41 |
42 | #ifdef __cplusplus
43 | }
44 | #endif
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/speex/speex_buffer.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2007 Jean-Marc Valin
2 |
3 | File: speex_buffer.h
4 | This is a very simple ring buffer implementation. It is not thread-safe
5 | so you need to do your own locking.
6 |
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions are
9 | met:
10 |
11 | 1. Redistributions of source code must retain the above copyright notice,
12 | this list of conditions and the following disclaimer.
13 |
14 | 2. Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | 3. The name of the author may not be used to endorse or promote products
19 | derived from this software without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 | POSSIBILITY OF SUCH DAMAGE.
32 | */
33 |
34 | #ifndef SPEEX_BUFFER_H
35 | #define SPEEX_BUFFER_H
36 |
37 | #include "speex_types.h"
38 |
39 | #ifdef __cplusplus
40 | extern "C" {
41 | #endif
42 |
43 | struct SpeexBuffer_;
44 | typedef struct SpeexBuffer_ SpeexBuffer;
45 |
46 | SpeexBuffer *speex_buffer_init(int size);
47 |
48 | void speex_buffer_destroy(SpeexBuffer *st);
49 |
50 | int speex_buffer_write(SpeexBuffer *st, void *data, int len);
51 |
52 | int speex_buffer_writezeros(SpeexBuffer *st, int len);
53 |
54 | int speex_buffer_read(SpeexBuffer *st, void *data, int len);
55 |
56 | int speex_buffer_get_available(SpeexBuffer *st);
57 |
58 | int speex_buffer_resize(SpeexBuffer *st, int len);
59 |
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 |
64 | #endif
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/speex/speex_config_types.h:
--------------------------------------------------------------------------------
1 | #ifndef __SPEEX_TYPES_H__
2 | #define __SPEEX_TYPES_H__
3 |
4 | /* these are filled in by configure */
5 | typedef short spx_int16_t;
6 | typedef unsigned short spx_uint16_t;
7 | typedef int spx_int32_t;
8 | typedef unsigned int spx_uint32_t;
9 |
10 | #endif
11 |
12 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/speex/speex_config_types.h.in:
--------------------------------------------------------------------------------
1 | #ifndef __SPEEX_TYPES_H__
2 | #define __SPEEX_TYPES_H__
3 |
4 | /* these are filled in by configure */
5 | typedef @SIZE16@ spx_int16_t;
6 | typedef unsigned @SIZE16@ spx_uint16_t;
7 | typedef @SIZE32@ spx_int32_t;
8 | typedef unsigned @SIZE32@ spx_uint32_t;
9 |
10 | #endif
11 |
12 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/speex/speex_header.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin */
2 | /**
3 | @file speex_header.h
4 | @brief Describes the Speex header
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 | */
35 |
36 |
37 | #ifndef SPEEX_HEADER_H
38 | #define SPEEX_HEADER_H
39 | /** @defgroup SpeexHeader SpeexHeader: Makes it easy to write/parse an Ogg/Speex header
40 | * This is the Speex header for the Ogg encapsulation. You don't need that if you just use RTP.
41 | * @{
42 | */
43 |
44 | #include "speex_types.h"
45 |
46 | #ifdef __cplusplus
47 | extern "C" {
48 | #endif
49 |
50 | struct SpeexMode;
51 |
52 | /** Length of the Speex header identifier */
53 | #define SPEEX_HEADER_STRING_LENGTH 8
54 |
55 | /** Maximum number of characters for encoding the Speex version number in the header */
56 | #define SPEEX_HEADER_VERSION_LENGTH 20
57 |
58 | /** Speex header info for file-based formats */
59 | typedef struct SpeexHeader {
60 | char speex_string[SPEEX_HEADER_STRING_LENGTH]; /**< Identifies a Speex bit-stream, always set to "Speex " */
61 | char speex_version[SPEEX_HEADER_VERSION_LENGTH]; /**< Speex version */
62 | spx_int32_t speex_version_id; /**< Version for Speex (for checking compatibility) */
63 | spx_int32_t header_size; /**< Total size of the header ( sizeof(SpeexHeader) ) */
64 | spx_int32_t rate; /**< Sampling rate used */
65 | spx_int32_t mode; /**< Mode used (0 for narrowband, 1 for wideband) */
66 | spx_int32_t mode_bitstream_version; /**< Version ID of the bit-stream */
67 | spx_int32_t nb_channels; /**< Number of channels encoded */
68 | spx_int32_t bitrate; /**< Bit-rate used */
69 | spx_int32_t frame_size; /**< Size of frames */
70 | spx_int32_t vbr; /**< 1 for a VBR encoding, 0 otherwise */
71 | spx_int32_t frames_per_packet; /**< Number of frames stored per Ogg packet */
72 | spx_int32_t extra_headers; /**< Number of additional headers after the comments */
73 | spx_int32_t reserved1; /**< Reserved for future use, must be zero */
74 | spx_int32_t reserved2; /**< Reserved for future use, must be zero */
75 | } SpeexHeader;
76 |
77 | /** Initializes a SpeexHeader using basic information */
78 | void speex_init_header(SpeexHeader *header, int rate, int nb_channels, const struct SpeexMode *m);
79 |
80 | /** Creates the header packet from the header itself (mostly involves endianness conversion) */
81 | char *speex_header_to_packet(SpeexHeader *header, int *size);
82 |
83 | /** Creates a SpeexHeader from a packet */
84 | SpeexHeader *speex_packet_to_header(char *packet, int size);
85 |
86 | /** Frees the memory allocated by either speex_header_to_packet() or speex_packet_to_header() */
87 | void speex_header_free(void *ptr);
88 |
89 | #ifdef __cplusplus
90 | }
91 | #endif
92 |
93 | /** @} */
94 | #endif
95 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/speex/speex_stereo.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin*/
2 | /**
3 | @file speex_stereo.h
4 | @brief Describes the handling for intensity stereo
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 |
35 | #ifndef STEREO_H
36 | #define STEREO_H
37 | /** @defgroup SpeexStereoState SpeexStereoState: Handling Speex stereo files
38 | * This describes the Speex intensity stereo encoding/decoding
39 | * @{
40 | */
41 |
42 | #include "speex_types.h"
43 | #include "speex_bits.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | /** If you access any of these fields directly, I'll personally come and bite you */
50 | typedef struct SpeexStereoState {
51 | float balance; /**< Left/right balance info */
52 | float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */
53 | float smooth_left; /**< Smoothed left channel gain */
54 | float smooth_right; /**< Smoothed right channel gain */
55 | float reserved1; /**< Reserved for future use */
56 | float reserved2; /**< Reserved for future use */
57 | } SpeexStereoState;
58 |
59 | /** Deprecated. Use speex_stereo_state_init() instead. */
60 | #define SPEEX_STEREO_STATE_INIT {1,.5,1,1,0,0}
61 |
62 | /** Initialise/create a stereo stereo state */
63 | SpeexStereoState *speex_stereo_state_init();
64 |
65 | /** Reset/re-initialise an already allocated stereo state */
66 | void speex_stereo_state_reset(SpeexStereoState *stereo);
67 |
68 | /** Destroy a stereo stereo state */
69 | void speex_stereo_state_destroy(SpeexStereoState *stereo);
70 |
71 | /** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */
72 | void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits);
73 |
74 | /** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */
75 | void speex_encode_stereo_int(spx_int16_t *data, int frame_size, SpeexBits *bits);
76 |
77 | /** Transforms a mono frame into a stereo frame using intensity stereo info */
78 | void speex_decode_stereo(float *data, int frame_size, SpeexStereoState *stereo);
79 |
80 | /** Transforms a mono frame into a stereo frame using intensity stereo info */
81 | void speex_decode_stereo_int(spx_int16_t *data, int frame_size, SpeexStereoState *stereo);
82 |
83 | /** Callback handler for intensity stereo info */
84 | int speex_std_stereo_request_handler(SpeexBits *bits, void *state, void *data);
85 |
86 | #ifdef __cplusplus
87 | }
88 | #endif
89 |
90 | /** @} */
91 | #endif
92 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/speex/speex_types.h:
--------------------------------------------------------------------------------
1 | /* speex_types.h taken from libogg */
2 | /********************************************************************
3 | * *
4 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8 | * *
9 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
10 | * by the Xiph.Org Foundation http://www.xiph.org/ *
11 | * *
12 | ********************************************************************
13 |
14 | function: #ifdef jail to whip a few platforms into the UNIX ideal.
15 | last mod: $Id: os_types.h 7524 2004-08-11 04:20:36Z conrad $
16 |
17 | ********************************************************************/
18 | /**
19 | @file speex_types.h
20 | @brief Speex types
21 | */
22 | #ifndef _SPEEX_TYPES_H
23 | #define _SPEEX_TYPES_H
24 |
25 | #if defined(_WIN32)
26 |
27 | # if defined(__CYGWIN__)
28 | # include <_G_config.h>
29 | typedef _G_int32_t spx_int32_t;
30 | typedef _G_uint32_t spx_uint32_t;
31 | typedef _G_int16_t spx_int16_t;
32 | typedef _G_uint16_t spx_uint16_t;
33 | # elif defined(__MINGW32__)
34 | typedef short spx_int16_t;
35 | typedef unsigned short spx_uint16_t;
36 | typedef int spx_int32_t;
37 | typedef unsigned int spx_uint32_t;
38 | # elif defined(__MWERKS__)
39 | typedef int spx_int32_t;
40 | typedef unsigned int spx_uint32_t;
41 | typedef short spx_int16_t;
42 | typedef unsigned short spx_uint16_t;
43 | # else
44 | /* MSVC/Borland */
45 | typedef __int32 spx_int32_t;
46 | typedef unsigned __int32 spx_uint32_t;
47 | typedef __int16 spx_int16_t;
48 | typedef unsigned __int16 spx_uint16_t;
49 | # endif
50 |
51 | #elif defined(__MACOS__)
52 |
53 | # include
54 | typedef SInt16 spx_int16_t;
55 | typedef UInt16 spx_uint16_t;
56 | typedef SInt32 spx_int32_t;
57 | typedef UInt32 spx_uint32_t;
58 |
59 | #elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */
60 |
61 | # include
62 | typedef int16_t spx_int16_t;
63 | typedef u_int16_t spx_uint16_t;
64 | typedef int32_t spx_int32_t;
65 | typedef u_int32_t spx_uint32_t;
66 |
67 | #elif defined(__BEOS__)
68 |
69 | /* Be */
70 | # include
71 | typedef int16_t spx_int16_t;
72 | typedef u_int16_t spx_uint16_t;
73 | typedef int32_t spx_int32_t;
74 | typedef u_int32_t spx_uint32_t;
75 |
76 | #elif defined (__EMX__)
77 |
78 | /* OS/2 GCC */
79 | typedef short spx_int16_t;
80 | typedef unsigned short spx_uint16_t;
81 | typedef int spx_int32_t;
82 | typedef unsigned int spx_uint32_t;
83 |
84 | #elif defined (DJGPP)
85 |
86 | /* DJGPP */
87 | typedef short spx_int16_t;
88 | typedef int spx_int32_t;
89 | typedef unsigned int spx_uint32_t;
90 |
91 | #elif defined(R5900)
92 |
93 | /* PS2 EE */
94 | typedef int spx_int32_t;
95 | typedef unsigned spx_uint32_t;
96 | typedef short spx_int16_t;
97 |
98 | #elif defined(__SYMBIAN32__)
99 |
100 | /* Symbian GCC */
101 | typedef signed short spx_int16_t;
102 | typedef unsigned short spx_uint16_t;
103 | typedef signed int spx_int32_t;
104 | typedef unsigned int spx_uint32_t;
105 |
106 | #elif defined(CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
107 |
108 | typedef short spx_int16_t;
109 | typedef unsigned short spx_uint16_t;
110 | typedef long spx_int32_t;
111 | typedef unsigned long spx_uint32_t;
112 |
113 | #elif defined(CONFIG_TI_C6X)
114 |
115 | typedef short spx_int16_t;
116 | typedef unsigned short spx_uint16_t;
117 | typedef int spx_int32_t;
118 | typedef unsigned int spx_uint32_t;
119 |
120 | #else
121 |
122 | # include
123 |
124 | #endif
125 |
126 | #endif /* _SPEEX_TYPES_H */
127 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/stack_alloc.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin */
2 | /**
3 | @file stack_alloc.h
4 | @brief Temporary memory allocation on stack
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 |
35 | #ifndef STACK_ALLOC_H
36 | #define STACK_ALLOC_H
37 |
38 | #ifdef USE_ALLOCA
39 | # ifdef WIN32
40 | # include
41 | # else
42 | # ifdef HAVE_ALLOCA_H
43 | # include
44 | # else
45 | # include
46 | # endif
47 | # endif
48 | #endif
49 |
50 | /**
51 | * @def ALIGN(stack, size)
52 | *
53 | * Aligns the stack to a 'size' boundary
54 | *
55 | * @param stack Stack
56 | * @param size New size boundary
57 | */
58 |
59 | /**
60 | * @def PUSH(stack, size, type)
61 | *
62 | * Allocates 'size' elements of type 'type' on the stack
63 | *
64 | * @param stack Stack
65 | * @param size Number of elements
66 | * @param type Type of element
67 | */
68 |
69 | /**
70 | * @def VARDECL(var)
71 | *
72 | * Declare variable on stack
73 | *
74 | * @param var Variable to declare
75 | */
76 |
77 | /**
78 | * @def ALLOC(var, size, type)
79 | *
80 | * Allocate 'size' elements of 'type' on stack
81 | *
82 | * @param var Name of variable to allocate
83 | * @param size Number of elements
84 | * @param type Type of element
85 | */
86 |
87 | #ifdef ENABLE_VALGRIND
88 |
89 | #include
90 |
91 | #define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
92 |
93 | #define PUSH(stack, size, type) (VALGRIND_MAKE_NOACCESS(stack, 1000),ALIGN((stack),sizeof(type)),VALGRIND_MAKE_WRITABLE(stack, ((size)*sizeof(type))),(stack)+=((size)*sizeof(type)),(type*)((stack)-((size)*sizeof(type))))
94 |
95 | #else
96 |
97 | #define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
98 |
99 | #define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)),(stack)+=((size)*sizeof(type)),(type*)((stack)-((size)*sizeof(type))))
100 |
101 | #endif
102 |
103 | #if defined(VAR_ARRAYS)
104 | #define VARDECL(var)
105 | #define ALLOC(var, size, type) type var[size]
106 | #elif defined(USE_ALLOCA)
107 | #define VARDECL(var) var
108 | #define ALLOC(var, size, type) var = alloca(sizeof(type)*(size))
109 | #else
110 | #define VARDECL(var) var
111 | #define ALLOC(var, size, type) var = PUSH(stack, size, type)
112 | #endif
113 |
114 |
115 | #endif
116 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/testdenoise.c:
--------------------------------------------------------------------------------
1 | #ifdef HAVE_CONFIG_H
2 | #include "config.h"
3 | #endif
4 |
5 | #include "speex/speex_preprocess.h"
6 | #include
7 |
8 | #define NN 160
9 |
10 | int main()
11 | {
12 | short in[NN];
13 | int i;
14 | SpeexPreprocessState *st;
15 | int count=0;
16 | float f;
17 |
18 | st = speex_preprocess_state_init(NN, 8000);
19 | i=1;
20 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i);
21 | i=0;
22 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC, &i);
23 | i=8000;
24 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC_LEVEL, &i);
25 | i=0;
26 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB, &i);
27 | f=.0;
28 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &f);
29 | f=.0;
30 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &f);
31 | while (1)
32 | {
33 | int vad;
34 | fread(in, sizeof(short), NN, stdin);
35 | if (feof(stdin))
36 | break;
37 | vad = speex_preprocess_run(st, in);
38 | /*fprintf (stderr, "%d\n", vad);*/
39 | fwrite(in, sizeof(short), NN, stdout);
40 | count++;
41 | }
42 | speex_preprocess_state_destroy(st);
43 | return 0;
44 | }
45 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/testecho.c:
--------------------------------------------------------------------------------
1 | #ifdef HAVE_CONFIG_H
2 | #include "config.h"
3 | #endif
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include "speex/speex_echo.h"
11 | #include "speex/speex_preprocess.h"
12 |
13 |
14 | #define NN 128
15 | #define TAIL 1024
16 |
17 | int main(int argc, char **argv)
18 | {
19 | FILE *echo_fd, *ref_fd, *e_fd;
20 | short echo_buf[NN], ref_buf[NN], e_buf[NN];
21 | SpeexEchoState *st;
22 | SpeexPreprocessState *den;
23 | int sampleRate = 8000;
24 |
25 | if (argc != 4)
26 | {
27 | fprintf(stderr, "testecho mic_signal.sw speaker_signal.sw output.sw\n");
28 | exit(1);
29 | }
30 | echo_fd = fopen(argv[2], "rb");
31 | ref_fd = fopen(argv[1], "rb");
32 | e_fd = fopen(argv[3], "wb");
33 |
34 | st = speex_echo_state_init(NN, TAIL);
35 | den = speex_preprocess_state_init(NN, sampleRate);
36 | speex_echo_ctl(st, SPEEX_ECHO_SET_SAMPLING_RATE, &sampleRate);
37 | speex_preprocess_ctl(den, SPEEX_PREPROCESS_SET_ECHO_STATE, st);
38 |
39 | while (!feof(ref_fd) && !feof(echo_fd))
40 | {
41 | fread(ref_buf, sizeof(short), NN, ref_fd);
42 | fread(echo_buf, sizeof(short), NN, echo_fd);
43 | speex_echo_cancellation(st, ref_buf, echo_buf, e_buf);
44 | speex_preprocess_run(den, e_buf);
45 | fwrite(e_buf, sizeof(short), NN, e_fd);
46 | }
47 | speex_echo_state_destroy(st);
48 | speex_preprocess_state_destroy(den);
49 | fclose(e_fd);
50 | fclose(echo_fd);
51 | fclose(ref_fd);
52 | return 0;
53 | }
54 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/testenc_uwb.c:
--------------------------------------------------------------------------------
1 | #ifdef HAVE_CONFIG_H
2 | #include "config.h"
3 | #endif
4 |
5 | #include "speex/speex.h"
6 | #include
7 | #include
8 | #include "speex/speex_callbacks.h"
9 |
10 | #ifdef FIXED_DEBUG
11 | extern long long spx_mips;
12 | #endif
13 |
14 | #define FRAME_SIZE 640
15 | #include
16 | int main(int argc, char **argv)
17 | {
18 | char *inFile, *outFile, *bitsFile;
19 | FILE *fin, *fout, *fbits=NULL;
20 | short in_short[FRAME_SIZE];
21 | short out_short[FRAME_SIZE];
22 | float in_float[FRAME_SIZE];
23 | float sigpow,errpow,snr, seg_snr=0;
24 | int snr_frames = 0;
25 | char cbits[200];
26 | int nbBits;
27 | int i;
28 | void *st;
29 | void *dec;
30 | SpeexBits bits;
31 | spx_int32_t tmp;
32 | int bitCount=0;
33 | spx_int32_t skip_group_delay;
34 | SpeexCallback callback;
35 |
36 | sigpow = 0;
37 | errpow = 0;
38 |
39 | st = speex_encoder_init(speex_lib_get_mode(SPEEX_MODEID_UWB));
40 | dec = speex_decoder_init(speex_lib_get_mode(SPEEX_MODEID_UWB));
41 |
42 | callback.callback_id = SPEEX_INBAND_CHAR;
43 | callback.func = speex_std_char_handler;
44 | callback.data = stderr;
45 | speex_decoder_ctl(dec, SPEEX_SET_HANDLER, &callback);
46 |
47 | callback.callback_id = SPEEX_INBAND_MODE_REQUEST;
48 | callback.func = speex_std_mode_request_handler;
49 | callback.data = st;
50 | speex_decoder_ctl(dec, SPEEX_SET_HANDLER, &callback);
51 |
52 | tmp=0;
53 | speex_decoder_ctl(dec, SPEEX_SET_ENH, &tmp);
54 | tmp=0;
55 | speex_encoder_ctl(st, SPEEX_SET_VBR, &tmp);
56 | tmp=7;
57 | speex_encoder_ctl(st, SPEEX_SET_QUALITY, &tmp);
58 | tmp=1;
59 | speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
60 |
61 | speex_encoder_ctl(st, SPEEX_GET_LOOKAHEAD, &skip_group_delay);
62 | speex_decoder_ctl(dec, SPEEX_GET_LOOKAHEAD, &tmp);
63 | skip_group_delay += tmp;
64 |
65 |
66 | if (argc != 4 && argc != 3)
67 | {
68 | fprintf (stderr, "Usage: encode [in file] [out file] [bits file]\nargc = %d", argc);
69 | exit(1);
70 | }
71 | inFile = argv[1];
72 | fin = fopen(inFile, "rb");
73 | outFile = argv[2];
74 | fout = fopen(outFile, "wb+");
75 | if (argc==4)
76 | {
77 | bitsFile = argv[3];
78 | fbits = fopen(bitsFile, "wb");
79 | }
80 | speex_bits_init(&bits);
81 | while (!feof(fin))
82 | {
83 | fread(in_short, sizeof(short), FRAME_SIZE, fin);
84 | if (feof(fin))
85 | break;
86 | for (i=0;i
7 | #include
8 | #include "speex/speex_callbacks.h"
9 |
10 | #ifdef FIXED_DEBUG
11 | extern long long spx_mips;
12 | #endif
13 |
14 | #define FRAME_SIZE 320
15 | #include
16 | int main(int argc, char **argv)
17 | {
18 | char *inFile, *outFile, *bitsFile;
19 | FILE *fin, *fout, *fbits=NULL;
20 | short in_short[FRAME_SIZE];
21 | short out_short[FRAME_SIZE];
22 | float sigpow,errpow,snr, seg_snr=0;
23 | int snr_frames = 0;
24 | char cbits[200];
25 | int nbBits;
26 | int i;
27 | void *st;
28 | void *dec;
29 | SpeexBits bits;
30 | spx_int32_t tmp;
31 | int bitCount=0;
32 | spx_int32_t skip_group_delay;
33 | SpeexCallback callback;
34 |
35 | sigpow = 0;
36 | errpow = 0;
37 |
38 | st = speex_encoder_init(speex_lib_get_mode(SPEEX_MODEID_WB));
39 | dec = speex_decoder_init(speex_lib_get_mode(SPEEX_MODEID_WB));
40 |
41 | callback.callback_id = SPEEX_INBAND_CHAR;
42 | callback.func = speex_std_char_handler;
43 | callback.data = stderr;
44 | speex_decoder_ctl(dec, SPEEX_SET_HANDLER, &callback);
45 |
46 | callback.callback_id = SPEEX_INBAND_MODE_REQUEST;
47 | callback.func = speex_std_mode_request_handler;
48 | callback.data = st;
49 | speex_decoder_ctl(dec, SPEEX_SET_HANDLER, &callback);
50 |
51 | tmp=1;
52 | speex_decoder_ctl(dec, SPEEX_SET_ENH, &tmp);
53 | tmp=0;
54 | speex_encoder_ctl(st, SPEEX_SET_VBR, &tmp);
55 | tmp=8;
56 | speex_encoder_ctl(st, SPEEX_SET_QUALITY, &tmp);
57 | tmp=3;
58 | speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
59 | /*tmp=3;
60 | speex_encoder_ctl(st, SPEEX_SET_HIGH_MODE, &tmp);
61 | tmp=6;
62 | speex_encoder_ctl(st, SPEEX_SET_LOW_MODE, &tmp);
63 | */
64 |
65 | speex_encoder_ctl(st, SPEEX_GET_LOOKAHEAD, &skip_group_delay);
66 | speex_decoder_ctl(dec, SPEEX_GET_LOOKAHEAD, &tmp);
67 | skip_group_delay += tmp;
68 |
69 |
70 | if (argc != 4 && argc != 3)
71 | {
72 | fprintf (stderr, "Usage: encode [in file] [out file] [bits file]\nargc = %d", argc);
73 | exit(1);
74 | }
75 | inFile = argv[1];
76 | fin = fopen(inFile, "rb");
77 | outFile = argv[2];
78 | fout = fopen(outFile, "wb+");
79 | if (argc==4)
80 | {
81 | bitsFile = argv[3];
82 | fbits = fopen(bitsFile, "wb");
83 | }
84 | speex_bits_init(&bits);
85 | while (!feof(fin))
86 | {
87 | fread(in_short, sizeof(short), FRAME_SIZE, fin);
88 | if (feof(fin))
89 | break;
90 | speex_bits_reset(&bits);
91 |
92 | speex_encode_int(st, in_short, &bits);
93 | nbBits = speex_bits_write(&bits, cbits, 200);
94 | bitCount+=bits.nbBits;
95 |
96 | if (argc==4)
97 | fwrite(cbits, 1, nbBits, fbits);
98 | speex_bits_rewind(&bits);
99 |
100 | speex_decode_int(dec, &bits, out_short);
101 | speex_bits_reset(&bits);
102 |
103 | fwrite(&out_short[skip_group_delay], sizeof(short), FRAME_SIZE-skip_group_delay, fout);
104 | skip_group_delay = 0;
105 | }
106 | fprintf (stderr, "Total encoded size: %d bits\n", bitCount);
107 | speex_encoder_destroy(st);
108 | speex_decoder_destroy(dec);
109 | speex_bits_destroy(&bits);
110 |
111 | rewind(fin);
112 | rewind(fout);
113 |
114 | while ( FRAME_SIZE == fread(in_short, sizeof(short), FRAME_SIZE, fin)
115 | &&
116 | FRAME_SIZE == fread(out_short, sizeof(short), FRAME_SIZE,fout) )
117 | {
118 | float s=0, e=0;
119 | for (i=0;i
7 |
8 | union jbpdata {
9 | unsigned int idx;
10 | unsigned char data[4];
11 | };
12 |
13 | void synthIn(JitterBufferPacket *in, int idx, int span) {
14 | union jbpdata d;
15 | d.idx = idx;
16 |
17 | in->data = d.data;
18 | in->len = sizeof(d);
19 | in->timestamp = idx * 10;
20 | in->span = span * 10;
21 | in->sequence = idx;
22 | in->user_data = 0;
23 | }
24 |
25 | void jitterFill(JitterBuffer *jb) {
26 | char buffer[65536];
27 | JitterBufferPacket in, out;
28 | int i;
29 |
30 | out.data = buffer;
31 |
32 | jitter_buffer_reset(jb);
33 |
34 | for(i=0;i<100;++i) {
35 | synthIn(&in, i, 1);
36 | jitter_buffer_put(jb, &in);
37 |
38 | out.len = 65536;
39 | if (jitter_buffer_get(jb, &out, 10, NULL) != JITTER_BUFFER_OK) {
40 | printf("Fill test failed iteration %d\n", i);
41 | }
42 | if (out.timestamp != i * 10) {
43 | printf("Fill test expected %d got %d\n", i*10, out.timestamp);
44 | }
45 | jitter_buffer_tick(jb);
46 | }
47 | }
48 |
49 | int main()
50 | {
51 | char buffer[65536];
52 | JitterBufferPacket in, out;
53 | int i;
54 |
55 | JitterBuffer *jb = jitter_buffer_init(10);
56 |
57 | out.data = buffer;
58 |
59 | /* Frozen sender case */
60 | jitterFill(jb);
61 | for(i=0;i<100;++i) {
62 | out.len = 65536;
63 | jitter_buffer_get(jb, &out, 10, NULL);
64 | jitter_buffer_tick(jb);
65 | }
66 | synthIn(&in, 100, 1);
67 | jitter_buffer_put(jb, &in);
68 | out.len = 65536;
69 | if (jitter_buffer_get(jb, &out, 10, NULL) != JITTER_BUFFER_OK) {
70 | printf("Failed frozen sender resynchronize\n");
71 | } else {
72 | printf("Frozen sender: Jitter %d\n", out.timestamp - 100*10);
73 | }
74 | return 0;
75 | }
76 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/vbr.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin */
2 | /**
3 | @file vbr.h
4 | @brief Variable Bit-Rate (VBR) related routines
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 | */
35 |
36 |
37 | #ifndef VBR_H
38 | #define VBR_H
39 |
40 | #include "arch.h"
41 |
42 | #define VBR_MEMORY_SIZE 5
43 |
44 | extern const float vbr_nb_thresh[9][11];
45 | extern const float vbr_hb_thresh[5][11];
46 | extern const float vbr_uhb_thresh[2][11];
47 |
48 | /** VBR state. */
49 | typedef struct VBRState {
50 | float energy_alpha;
51 | float average_energy;
52 | float last_energy;
53 | float last_log_energy[VBR_MEMORY_SIZE];
54 | float accum_sum;
55 | float last_pitch_coef;
56 | float soft_pitch;
57 | float last_quality;
58 | float noise_level;
59 | float noise_accum;
60 | float noise_accum_count;
61 | int consec_noise;
62 | } VBRState;
63 |
64 | void vbr_init(VBRState *vbr);
65 |
66 | float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float pitch_coef);
67 |
68 | void vbr_destroy(VBRState *vbr);
69 |
70 | #endif
71 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/vorbis_psy.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2005 Jean-Marc Valin, CSIRO, Christopher Montgomery
2 | File: vorbis_psy.h
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 | - Neither the name of the Xiph.org Foundation nor the names of its
16 | contributors may be used to endorse or promote products derived from
17 | this software without specific prior written permission.
18 |
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | */
31 |
32 | #ifndef VORBIS_PSY_H
33 | #define VORBIS_PSY_H
34 |
35 | #ifdef VORBIS_PSYCHO
36 |
37 | #include "smallft.h"
38 | #define P_BANDS 17 /* 62Hz to 16kHz */
39 | #define NOISE_COMPAND_LEVELS 40
40 |
41 |
42 | #define todB(x) ((x)>1e-13?log((x)*(x))*4.34294480f:-30)
43 | #define fromdB(x) (exp((x)*.11512925f))
44 |
45 | /* The bark scale equations are approximations, since the original
46 | table was somewhat hand rolled. The below are chosen to have the
47 | best possible fit to the rolled tables, thus their somewhat odd
48 | appearance (these are more accurate and over a longer range than
49 | the oft-quoted bark equations found in the texts I have). The
50 | approximations are valid from 0 - 30kHz (nyquist) or so.
51 |
52 | all f in Hz, z in Bark */
53 |
54 | #define toBARK(n) (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n))
55 | #define fromBARK(z) (102.f*(z)-2.f*pow(z,2.f)+.4f*pow(z,3.f)+pow(1.46f,z)-1.f)
56 |
57 | /* Frequency to octave. We arbitrarily declare 63.5 Hz to be octave
58 | 0.0 */
59 |
60 | #define toOC(n) (log(n)*1.442695f-5.965784f)
61 | #define fromOC(o) (exp(((o)+5.965784f)*.693147f))
62 |
63 |
64 | typedef struct {
65 |
66 | float noisewindowlo;
67 | float noisewindowhi;
68 | int noisewindowlomin;
69 | int noisewindowhimin;
70 | int noisewindowfixed;
71 | float noiseoff[P_BANDS];
72 | float noisecompand[NOISE_COMPAND_LEVELS];
73 |
74 | } VorbisPsyInfo;
75 |
76 |
77 |
78 | typedef struct {
79 | int n;
80 | int rate;
81 | struct drft_lookup lookup;
82 | VorbisPsyInfo *vi;
83 |
84 | float *window;
85 | float *noiseoffset;
86 | long *bark;
87 |
88 | } VorbisPsy;
89 |
90 |
91 | VorbisPsy *vorbis_psy_init(int rate, int size);
92 | void vorbis_psy_destroy(VorbisPsy *psy);
93 | void compute_curve(VorbisPsy *psy, float *audio, float *curve);
94 | void curve_to_lpc(VorbisPsy *psy, float *curve, float *awk1, float *awk2, int ord);
95 |
96 | #endif
97 | #endif
98 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/vq.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin */
2 | /**
3 | @file vq.h
4 | @brief Vector quantization
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 |
35 | #ifndef VQ_H
36 | #define VQ_H
37 |
38 | #include "arch.h"
39 |
40 | int scal_quant(spx_word16_t in, const spx_word16_t *boundary, int entries);
41 | int scal_quant32(spx_word32_t in, const spx_word32_t *boundary, int entries);
42 |
43 | #ifdef _USE_SSE
44 | #include
45 | void vq_nbest(spx_word16_t *in, const __m128 *codebook, int len, int entries, __m128 *E, int N, int *nbest, spx_word32_t *best_dist, char *stack);
46 |
47 | void vq_nbest_sign(spx_word16_t *in, const __m128 *codebook, int len, int entries, __m128 *E, int N, int *nbest, spx_word32_t *best_dist, char *stack);
48 | #else
49 | void vq_nbest(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack);
50 |
51 | void vq_nbest_sign(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack);
52 | #endif
53 |
54 | #endif
55 |
--------------------------------------------------------------------------------
/Pod/Classes/Libs/libspeex/vq_sse.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2004 Jean-Marc Valin */
2 | /**
3 | @file vq_sse.h
4 | @brief SSE-optimized vq routine
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written 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 FOUNDATION OR
26 | 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 |
35 | #define OVERRIDE_VQ_NBEST
36 | void vq_nbest(spx_word16_t *_in, const __m128 *codebook, int len, int entries, __m128 *E, int N, int *nbest, spx_word32_t *best_dist, char *stack)
37 | {
38 | int i,j,k,used;
39 | VARDECL(float *dist);
40 | VARDECL(__m128 *in);
41 | __m128 half;
42 | used = 0;
43 | ALLOC(dist, entries, float);
44 | half = _mm_set_ps1(.5f);
45 | ALLOC(in, len, __m128);
46 | for (i=0;i>2;i++)
49 | {
50 | __m128 d = _mm_mul_ps(E[i], half);
51 | for (j=0;j= 1) && (k > used || dist[i] < best_dist[k-1]); k--)
60 | {
61 | best_dist[k]=best_dist[k-1];
62 | nbest[k] = nbest[k-1];
63 | }
64 | best_dist[k]=dist[i];
65 | nbest[k]=i;
66 | used++;
67 | }
68 | }
69 | }
70 |
71 |
72 |
73 |
74 | #define OVERRIDE_VQ_NBEST_SIGN
75 | void vq_nbest_sign(spx_word16_t *_in, const __m128 *codebook, int len, int entries, __m128 *E, int N, int *nbest, spx_word32_t *best_dist, char *stack)
76 | {
77 | int i,j,k,used;
78 | VARDECL(float *dist);
79 | VARDECL(__m128 *in);
80 | __m128 half;
81 | used = 0;
82 | ALLOC(dist, entries, float);
83 | half = _mm_set_ps1(.5f);
84 | ALLOC(in, len, __m128);
85 | for (i=0;i>2;i++)
88 | {
89 | __m128 d = _mm_setzero_ps();
90 | for (j=0;j0)
98 | {
99 | sign=0;
100 | dist[i]=-dist[i];
101 | } else
102 | {
103 | sign=1;
104 | }
105 | dist[i] += .5f*((float*)E)[i];
106 | if (i= 1) && (k > used || dist[i] < best_dist[k-1]); k--)
109 | {
110 | best_dist[k]=best_dist[k-1];
111 | nbest[k] = nbest[k-1];
112 | }
113 | best_dist[k]=dist[i];
114 | nbest[k]=i;
115 | used++;
116 | if (sign)
117 | nbest[k]+=entries;
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/Pod/Classes/PlayerManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // PlayerManager.h
3 | // OggSpeex
4 | //
5 | // Created by Jiang Chuncheng on 6/25/13.
6 | // Copyright (c) 2013 Sense Force. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "Decapsulator.h"
12 |
13 | @protocol PlayingDelegate
14 |
15 | - (void)playingStoped;
16 |
17 | @end
18 |
19 | @interface PlayerManager : NSObject {
20 | Decapsulator *decapsulator;
21 | AVAudioPlayer *avAudioPlayer;
22 |
23 | }
24 | @property (nonatomic, strong) Decapsulator *decapsulator;
25 | @property (nonatomic, strong) AVAudioPlayer *avAudioPlayer;
26 | @property (nonatomic, weak) id delegate;
27 |
28 | + (PlayerManager *)sharedManager;
29 |
30 | - (void)playAudioWithFileName:(NSString *)filename delegate:(id)newDelegate;
31 | - (void)stopPlaying;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Pod/Classes/PublicUtility/CADebugMacros.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | File: CADebugMacros.cpp
3 | Abstract: CADebugMacros.h
4 | Version: 2.5
5 |
6 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms, and
14 | subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the Apple
17 | Software, with or without modifications, in source and/or binary forms;
18 | provided that if you redistribute the Apple Software in its entirety and
19 | without modifications, you must retain this notice and the following
20 | text and disclaimers in all such redistributions of the Apple Software.
21 | Neither the name, trademarks, service marks or logos of Apple Inc. may
22 | be used to endorse or promote products derived from the Apple Software
23 | without specific prior written permission from Apple. Except as
24 | expressly stated in this notice, no other rights or licenses, express or
25 | implied, are granted by Apple herein, including but not limited to any
26 | patent rights that may be infringed by your derivative works or by other
27 | works in which the Apple Software may be incorporated.
28 |
29 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
30 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
31 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
32 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
33 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
34 |
35 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
36 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
38 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
39 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
40 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
41 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
42 | POSSIBILITY OF SUCH DAMAGE.
43 |
44 | Copyright (C) 2012 Apple Inc. All Rights Reserved.
45 |
46 | */
47 | #include "CADebugMacros.h"
48 | #include
49 | #include
50 | #if TARGET_API_MAC_OSX
51 | #include
52 | #endif
53 |
54 | #if DEBUG
55 | #include
56 |
57 | void DebugPrint(const char *fmt, ...)
58 | {
59 | va_list args;
60 | va_start(args, fmt);
61 | vprintf(fmt, args);
62 | va_end(args);
63 | }
64 | #endif // DEBUG
65 |
66 | #if TARGET_API_MAC_OSX
67 | void LogError(const char *fmt, ...)
68 | {
69 | va_list args;
70 | va_start(args, fmt);
71 | #if DEBUG
72 | vprintf(fmt, args);
73 | #endif
74 | vsyslog(LOG_ERR, fmt, args);
75 | va_end(args);
76 | }
77 |
78 | void LogWarning(const char *fmt, ...)
79 | {
80 | va_list args;
81 | va_start(args, fmt);
82 | #if DEBUG
83 | vprintf(fmt, args);
84 | #endif
85 | vsyslog(LOG_WARNING, fmt, args);
86 | va_end(args);
87 | }
88 | #endif
89 |
--------------------------------------------------------------------------------
/Pod/Classes/PublicUtility/CAMath.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: CAMath.h
3 | Abstract: Part of CoreAudio Utility Classes
4 | Version: 2.5
5 |
6 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms, and
14 | subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the Apple
17 | Software, with or without modifications, in source and/or binary forms;
18 | provided that if you redistribute the Apple Software in its entirety and
19 | without modifications, you must retain this notice and the following
20 | text and disclaimers in all such redistributions of the Apple Software.
21 | Neither the name, trademarks, service marks or logos of Apple Inc. may
22 | be used to endorse or promote products derived from the Apple Software
23 | without specific prior written permission from Apple. Except as
24 | expressly stated in this notice, no other rights or licenses, express or
25 | implied, are granted by Apple herein, including but not limited to any
26 | patent rights that may be infringed by your derivative works or by other
27 | works in which the Apple Software may be incorporated.
28 |
29 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
30 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
31 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
32 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
33 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
34 |
35 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
36 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
38 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
39 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
40 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
41 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
42 | POSSIBILITY OF SUCH DAMAGE.
43 |
44 | Copyright (C) 2012 Apple Inc. All Rights Reserved.
45 |
46 | */
47 | #ifndef __CAMath_h__
48 | #define __CAMath_h__
49 |
50 | #if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
51 | #include
52 | #else
53 | #include
54 | #endif
55 |
56 | inline bool fiszero(Float64 f) { return (f == 0.); }
57 | inline bool fiszero(Float32 f) { return (f == 0.f); }
58 |
59 | inline bool fnonzero(Float64 f) { return !fiszero(f); }
60 | inline bool fnonzero(Float32 f) { return !fiszero(f); }
61 |
62 | inline bool fequal(const Float64 &a, const Float64 &b) { return a == b; }
63 | inline bool fequal(const Float32 &a, const Float32 &b) { return a == b; }
64 |
65 | inline bool fnotequal(const Float64 &a, const Float64 &b) { return !fequal(a, b); }
66 | inline bool fnotequal(const Float32 &a, const Float32 &b) { return !fequal(a, b); }
67 |
68 | #endif // __CAMath_h__
69 |
--------------------------------------------------------------------------------
/Pod/Classes/PublicUtility/CAXException.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | File: CAXException.cpp
3 | Abstract: CAXException.h
4 | Version: 2.5
5 |
6 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms, and
14 | subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the Apple
17 | Software, with or without modifications, in source and/or binary forms;
18 | provided that if you redistribute the Apple Software in its entirety and
19 | without modifications, you must retain this notice and the following
20 | text and disclaimers in all such redistributions of the Apple Software.
21 | Neither the name, trademarks, service marks or logos of Apple Inc. may
22 | be used to endorse or promote products derived from the Apple Software
23 | without specific prior written permission from Apple. Except as
24 | expressly stated in this notice, no other rights or licenses, express or
25 | implied, are granted by Apple herein, including but not limited to any
26 | patent rights that may be infringed by your derivative works or by other
27 | works in which the Apple Software may be incorporated.
28 |
29 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
30 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
31 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
32 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
33 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
34 |
35 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
36 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
38 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
39 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
40 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
41 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
42 | POSSIBILITY OF SUCH DAMAGE.
43 |
44 | Copyright (C) 2012 Apple Inc. All Rights Reserved.
45 |
46 | */
47 | #include "CAXException.h"
48 |
49 | CAXException::WarningHandler CAXException::sWarningHandler = NULL;
50 |
--------------------------------------------------------------------------------
/Pod/Classes/RawAudioDataPlayer.h:
--------------------------------------------------------------------------------
1 | //
2 | // RawAudioDataPlayer.h
3 | // OggSpeex
4 | //
5 | // Created by Jiang Chuncheng on 6/25/13.
6 | // Copyright (c) 2013 Sense Force. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | #define QUEUE_BUFFER_SIZE 4 //队列缓冲个数
14 | #define EVERY_READ_LENGTH 1000 //每次从文件读取的长度
15 | #define MIN_SIZE_PER_FRAME 2000 //每侦最小数据长
16 |
17 | #define NOTIFICATION_PLAY_OVER @"playingOver"
18 |
19 | @interface RawAudioDataPlayer : NSObject {
20 | AudioStreamBasicDescription audioDescription;///音频参数
21 | AudioQueueRef audioQueue;//音频播放队列
22 | AudioQueueBufferRef audioQueueBuffers[QUEUE_BUFFER_SIZE];//音频缓存
23 | NSLock *synlock ;///同步控制
24 | Byte *pcmDataBuffer;//pcm的读文件数据区
25 |
26 | BOOL isDataInputOver;
27 | NSMutableData *mPcmData;
28 | NSUInteger readedBytes;
29 | NSMutableArray *emptyAudioQueueBufferIndexs;
30 | }
31 |
32 | @property (nonatomic, assign) BOOL isDataInputOver;
33 |
34 | static void AudioPlayerAQInputCallback(void *input, AudioQueueRef inQ, AudioQueueBufferRef outQB);
35 |
36 | - (void)startPlay;
37 | - (void)stopPlay;
38 | - (void)inputNewDataFromBuffer:(Byte *)buffer size:(int)bufferSize;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Pod/Classes/RecorderManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // RecorderManager.h
3 | // OggSpeex
4 | //
5 | // Created by Jiang Chuncheng on 6/25/13.
6 | // Copyright (c) 2013 Sense Force. All rights reserved.
7 | //
8 |
9 | #import
10 | //#import "AQRecorder.h"
11 | #import "Encapsulator.h"
12 |
13 | @protocol RecordingDelegate
14 |
15 | - (void)recordingFinishedWithFileName:(NSString *)filePath time:(NSTimeInterval)interval;
16 | - (void)recordingTimeout;
17 | - (void)recordingStopped; //录音机停止采集声音
18 | - (void)recordingFailed:(NSString *)failureInfoString;
19 |
20 | @optional
21 | - (void)levelMeterChanged:(float)levelMeter;
22 |
23 | @end
24 |
25 | @interface RecorderManager : NSObject {
26 |
27 | Encapsulator *encapsulator;
28 | NSString *filename;
29 | NSDate *dateStartRecording;
30 | NSDate *dateStopRecording;
31 | NSTimer *timerLevelMeter;
32 | NSTimer *timerTimeout;
33 | }
34 |
35 | @property (nonatomic, weak) id delegate;
36 | @property (nonatomic, strong) Encapsulator *encapsulator;
37 | @property (nonatomic, strong) NSDate *dateStartRecording, *dateStopRecording;
38 | @property (nonatomic, strong) NSTimer *timerLevelMeter;
39 | @property (nonatomic, strong) NSTimer *timerTimeout;
40 |
41 | + (RecorderManager *)sharedManager;
42 |
43 | - (void)startRecording;
44 |
45 | - (void)stopRecording;
46 |
47 | - (void)cancelRecording;
48 |
49 | - (NSTimeInterval)recordedTimeInterval;
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # speex
2 |
3 | [](https://travis-ci.org/guange/speex)
4 | [](http://cocoapods.org/pods/speex)
5 | [](http://cocoapods.org/pods/speex)
6 | [](http://cocoapods.org/pods/speex)
7 |
8 | ## Usage
9 |
10 | To run the example project, clone the repo, and run `pod install` from the Example directory first.
11 |
12 | ## Requirements
13 |
14 | ## Installation
15 |
16 | speex is available through [CocoaPods](http://cocoapods.org). To install
17 | it, simply add the following line to your Podfile:
18 |
19 | ```ruby
20 | pod 'speex', :git => 'https://github.com/guange2015/speex.git'
21 | ```
22 |
23 | ## Author
24 |
25 | guange
26 |
27 | ## License
28 |
29 | speex is available under the MIT license. See the LICENSE file for more info.
30 |
--------------------------------------------------------------------------------
/_Pods.xcodeproj:
--------------------------------------------------------------------------------
1 | Example/Pods/Pods.xcodeproj
--------------------------------------------------------------------------------
/speex.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod lib lint speex.podspec' to ensure this is a
3 | # valid spec before submitting.
4 | #
5 | # Any lines starting with a # are optional, but their use is encouraged
6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
7 | #
8 |
9 | Pod::Spec.new do |s|
10 | s.name = "speex"
11 | s.version = "0.1.0"
12 | s.summary = "A short description of speex."
13 |
14 | # This description is used to generate tags and improve search results.
15 | # * Think: What does it do? Why did you write it? What is the focus?
16 | # * Try to keep it short, snappy and to the point.
17 | # * Write the description between the DESC delimiters below.
18 | # * Finally, don't worry about the indent, CocoaPods strips it!
19 | s.description = <<-DESC
20 | DESC
21 |
22 | s.homepage = "https://github.com/guange2015/speex"
23 | # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
24 | s.license = 'MIT'
25 | s.author = { "guange" => "8863824@gmail.com" }
26 | s.source = { :git => "https://github.com/guange2015/speex.git", :tag => s.version.to_s }
27 | # s.social_media_url = 'https://twitter.com/'
28 |
29 | s.platform = :ios, '7.0'
30 | s.requires_arc = true
31 |
32 | s.source_files = 'Pod/Classes/**/*'
33 | s.resource_bundles = {
34 | 'speex' => ['Pod/Assets/*.png']
35 | }
36 |
37 | # s.public_header_files = 'Pod/Classes/**/*.h'
38 | # s.frameworks = 'UIKit', 'MapKit'
39 | # s.frameworks = ''
40 | s.library = 'c++'
41 | # s.dependency 'AFNetworking', '~> 2.3'
42 | end
43 |
--------------------------------------------------------------------------------