├── .github └── workflows │ └── main.yml ├── .gitignore ├── AudioFile.h ├── CMakeLists.txt ├── LICENSE ├── README.md ├── examples ├── CMakeLists.txt ├── examples.cpp └── test-audio.wav └── tests ├── AiffLoadingTests.cpp ├── CMakeLists.txt ├── FileWritingTests.cpp ├── GeneralTests.cpp ├── SampleConversionTests.cpp ├── WavLoadingTests.cpp ├── doctest └── doctest.h ├── main.cpp ├── makeHeaders.py ├── test-audio ├── aiff_stereo_16bit_44100.aif ├── aiff_stereo_16bit_48000.aif ├── aiff_stereo_24bit_44100.aif ├── aiff_stereo_24bit_48000.aif ├── aiff_stereo_32bit_44100.aif ├── aiff_stereo_32bit_48000.aif ├── aiff_stereo_8bit_44100.aif ├── aiff_stereo_8bit_48000.aif ├── wav_8chan_24bit_48000.wav ├── wav_mono_16bit_44100.wav ├── wav_mono_16bit_48000.wav ├── wav_stereo_16bit_44100.wav ├── wav_stereo_16bit_48000.wav ├── wav_stereo_24bit_44100.wav ├── wav_stereo_24bit_48000.wav ├── wav_stereo_32bit_44100.wav ├── wav_stereo_32bit_48000.wav ├── wav_stereo_8bit_44100.wav └── wav_stereo_8bit_48000.wav └── test-headers ├── aiff_stereo_16bit_44100.h ├── aiff_stereo_16bit_48000.h ├── aiff_stereo_24bit_44100.h ├── aiff_stereo_24bit_48000.h ├── aiff_stereo_32bit_44100.h ├── aiff_stereo_32bit_48000.h ├── aiff_stereo_8bit_44100.h ├── aiff_stereo_8bit_48000.h ├── wav_8chan_24bit_48000.h ├── wav_mono_16bit_44100.h ├── wav_mono_16bit_48000.h ├── wav_stereo_16bit_44100.h ├── wav_stereo_16bit_48000.h ├── wav_stereo_24bit_44100.h ├── wav_stereo_24bit_48000.h ├── wav_stereo_32bit_44100.h ├── wav_stereo_32bit_48000.h ├── wav_stereo_8bit_44100.h └── wav_stereo_8bit_48000.h /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build and Test 2 | 3 | on: 4 | push: 5 | branches: [ master, develop ] 6 | pull_request: 7 | branches: [ master, develop ] 8 | 9 | jobs: 10 | build: 11 | strategy: 12 | matrix: 13 | os: [ubuntu-latest, macos-latest, windows-latest] 14 | runs-on: ${{ matrix.os }} 15 | 16 | steps: 17 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 18 | - uses: actions/checkout@v2 19 | 20 | - name: Build 21 | run: | 22 | mkdir build 23 | cd build 24 | cmake .. 25 | cmake --build . 26 | 27 | - name: Unit Tests 28 | run: | 29 | cd build 30 | ctest -C Debug -VV 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | 26 | *.pyc 27 | .vscode/ 28 | 29 | audio-write-tests -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #=============================================================================== 2 | cmake_minimum_required (VERSION 3.12) 3 | 4 | project ("AudioFile" VERSION 1.1.3 5 | DESCRIPTION "A simple C++ library for reading and writing audio files." 6 | HOMEPAGE_URL "https://github.com/adamstark/AudioFile") 7 | 8 | #=============================================================================== 9 | include (GNUInstallDirs) 10 | 11 | #=============================================================================== 12 | option (BUILD_TESTS "Build tests" ON) 13 | option (BUILD_EXAMPLES "Build examples" ON) 14 | 15 | #=============================================================================== 16 | set (AUDIOFILE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/AudioFile.h) 17 | source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${AUDIOFILE_SOURCES}) 18 | 19 | add_library (${PROJECT_NAME} INTERFACE ${AUDIOFILE_SOURCES}) 20 | 21 | #=============================================================================== 22 | target_include_directories (${PROJECT_NAME} INTERFACE 23 | $ 24 | $) 25 | 26 | #=============================================================================== 27 | target_compile_features (${PROJECT_NAME} INTERFACE cxx_std_17) 28 | 29 | #=============================================================================== 30 | if (BUILD_EXAMPLES) 31 | add_subdirectory (examples) 32 | endif () 33 | 34 | if (BUILD_TESTS) 35 | enable_testing() 36 | add_subdirectory (tests) 37 | endif () 38 | 39 | #=============================================================================== 40 | set (CMAKE_SUPPRESS_REGENERATION true) 41 | 42 | #=============================================================================== 43 | include (CMakePackageConfigHelpers) 44 | 45 | install (TARGETS ${PROJECT_NAME} 46 | EXPORT ${PROJECT_NAME}Targets 47 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} 48 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 49 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} 50 | INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 51 | ) 52 | 53 | install (FILES ${PROJECT_SOURCE_DIR}/AudioFile.h 54 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} 55 | ) 56 | 57 | install (EXPORT ${PROJECT_NAME}Targets 58 | FILE ${PROJECT_NAME}Targets.cmake 59 | NAMESPACE ${PROJECT_NAME}:: 60 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} 61 | ) 62 | 63 | file (WRITE ${PROJECT_BINARY_DIR}/Config.cmake.in 64 | "@PACKAGE_INIT@\n\ninclude(\"\${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake\")\n\ncheck_required_components(@PROJECT_NAME@)\n" 65 | ) 66 | 67 | configure_package_config_file ( 68 | ${PROJECT_BINARY_DIR}/Config.cmake.in 69 | ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake 70 | INSTALL_DESTINATION 71 | ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} 72 | ) 73 | 74 | write_basic_package_version_file ( 75 | ${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake 76 | VERSION ${PROJECT_VERSION} 77 | COMPATIBILITY SameMajorVersion 78 | ARCH_INDEPENDENT 79 | ) 80 | 81 | install (FILES 82 | ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake 83 | ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake 84 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} 85 | ) 86 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Adam Stark 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AudioFile 2 | 3 | 4 | 5 | ![Version](https://img.shields.io/badge/version-1.1.3-green.svg?style=flat-square) 6 | ![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square) 7 | ![Language](https://img.shields.io/badge/language-C++-yellow.svg?style=flat-square) 8 | 9 | A simple header-only C++ library for reading and writing audio files. 10 | 11 | Current supported formats: 12 | 13 | - WAV 14 | - AIFF 15 | 16 | ## Author 17 | 18 | AudioFile is written and maintained by Adam Stark. 19 | 20 | [http://www.adamstark.co.uk](http://www.adamstark.co.uk) 21 | 22 | ## Usage 23 | 24 | ### Create an AudioFile object: 25 | 26 | #include "AudioFile.h" 27 | 28 | AudioFile audioFile; 29 | 30 | ### Load an audio file: 31 | 32 | audioFile.load ("/path/to/my/audiofile.wav"); 33 | 34 | ### Get some information about the loaded audio: 35 | 36 | int sampleRate = audioFile.getSampleRate(); 37 | int bitDepth = audioFile.getBitDepth(); 38 | 39 | int numSamples = audioFile.getNumSamplesPerChannel(); 40 | double lengthInSeconds = audioFile.getLengthInSeconds(); 41 | 42 | int numChannels = audioFile.getNumChannels(); 43 | bool isMono = audioFile.isMono(); 44 | bool isStereo = audioFile.isStereo(); 45 | 46 | // or, just use this quick shortcut to print a summary to the console 47 | audioFile.printSummary(); 48 | 49 | ### Access the samples directly: 50 | 51 | int channel = 0; 52 | int numSamples = audioFile.getNumSamplesPerChannel(); 53 | 54 | for (int i = 0; i < numSamples; i++) 55 | { 56 | double currentSample = audioFile.samples[channel][i]; 57 | } 58 | 59 | ### Replace the AudioFile audio buffer with another 60 | 61 | // 1. Create an AudioBuffer 62 | // (BTW, AudioBuffer is just a vector of vectors) 63 | 64 | AudioFile::AudioBuffer buffer; 65 | 66 | // 2. Set to (e.g.) two channels 67 | buffer.resize (2); 68 | 69 | // 3. Set number of samples per channel 70 | buffer[0].resize (100000); 71 | buffer[1].resize (100000); 72 | 73 | // 4. do something here to fill the buffer with samples, e.g. 74 | 75 | #include // somewhere earler (for M_PI and sinf()) 76 | 77 | // then... 78 | 79 | int numChannels = 2; 80 | int numSamplesPerChannel = 100000; 81 | float sampleRate = 44100.f; 82 | float frequency = 440.f; 83 | 84 | for (int i = 0; i < numSamplesPerChannel; i++) 85 | { 86 | float sample = sinf (2. * M_PI * ((float) i / sampleRate) * frequency) ; 87 | 88 | for (int channel = 0; channel < numChannels; channel++) 89 | buffer[channel][i] = sample * 0.5; 90 | } 91 | 92 | // 5. Put into the AudioFile object 93 | bool ok = audioFile.setAudioBuffer (buffer); 94 | 95 | ### Resize the audio buffer 96 | 97 | // Set both the number of channels and number of samples per channel 98 | audioFile.setAudioBufferSize (numChannels, numSamples); 99 | 100 | // Set the number of samples per channel 101 | audioFile.setNumSamplesPerChannel (numSamples); 102 | 103 | // Set the number of channels 104 | audioFile.setNumChannels (numChannels); 105 | 106 | ### Set bit depth and sample rate 107 | 108 | audioFile.setBitDepth (24); 109 | audioFile.setSampleRate (44100); 110 | 111 | ### Save the audio file to disk 112 | 113 | // Wave file (implicit) 114 | audioFile.save ("path/to/desired/audioFile.wav"); 115 | 116 | // Wave file (explicit) 117 | audioFile.save ("path/to/desired/audioFile.wav", AudioFileFormat::Wave); 118 | 119 | // Aiff file 120 | audioFile.save ("path/to/desired/audioFile.aif", AudioFileFormat::Aiff); 121 | 122 | ### Save the audio file to memory 123 | 124 | Write the audio file data directly to a vector of bytes (without writing to a file on disk): 125 | 126 | std::vector fileData; 127 | audioFile.saveToMemory (fileData, AudioFileFormat::Wave); 128 | 129 | or 130 | 131 | audioFile.saveToMemory (fileData, AudioFileFormat::Aiff); 132 | 133 | ## Examples 134 | 135 | Please see the `examples` folder for some examples on library usage. 136 | 137 | ## A Note On Types 138 | 139 | AudioFile is a template class and so it can be instantiated using different types to represent the audio samples. 140 | 141 | For example, we can use floating point precision... 142 | 143 | AudioFile audioFile; 144 | 145 | ...or double precision... 146 | 147 | AudioFile audioFile; 148 | 149 | ...or an integer type: 150 | 151 | AudioFile audioFile; 152 | 153 | This simply reflects the data type you would like to use to store the underlying audio samples. 154 | 155 | When you use an integer type to store the samples (e.g. `int` or `int8_t` or `int16_t` or `uint32_t`), the library will read in the integer sample values directly from the audio file. 156 | 157 | A couple of notes on integer types: 158 | 159 | - The range of samples is designed to be symmetric. This means that for (e.g.) an signed 8-bit integer (`int8_t`) we will use the range `[-127, 127]` for storing samples representing the `[-1., 1.]` range. The value `-128` is possible here given the `int8_t` type, but this is interpreted as a value slightly lower than `-1` (specifically `-1.007874015748`). 160 | 161 | - In the case of unsigned types, we obviously can't store samples as negative values. Therefore, we used the equivalent range of the unsigned type in use. E.g. if with a 8-bit signed integer (`int8_t`) the range would be `[-127, 127]`, for an 8-bit unsigned integer we would use the range `[1, 255]`. Note that we don't use `-128` for `int8_t` or `0` in `uint8_t`. 162 | 163 | - If you try to read an audio file with a larger bit-depth than the type you are using to store samples, the attempt to read the file will fail. Put more simply, you can't read a 16-bit audio sample into an 8-bit integer. 164 | 165 | - If you are writing audio samples in integer formats, you should use the correct sample range for both a) the type you are using to store samples; and b) the bit depth of the audio you want to write. 166 | 167 | The following table details the sample range for each bit-depth: 168 | 169 | | Type | 8-bit Audio | 16-bit Audio | 24-bit Audio | 32-bit Audio | 170 | | ---------- | ------------- | -------------------- | --------------------- | --------------------------- | 171 | | `float` | `[-1.0, 1.0]` | `[-1.0, 1.0]` | `[-1.0, 1.0]` | `[-1.0, 1.0]` | 172 | | `double` | `[-1.0, 1.0]` | `[-1.0, 1.0]` | `[-1.0, 1.0]` | `[-1.0, 1.0]` | 173 | | `int8_t` | `[-127, 127]` | :x: (type too small) | :x: (type too small) | :x: (type too small) | 174 | | `uint8_t` | `[1, 255]` | :x: (type too small) | :x: (type too small) | :x: (type too small) | 175 | | `int16_t` | `[-127, 127]` | `[-32767, 32767]` | :x: (type too small) | :x: (type too small) | 176 | | `uint16_t` | `[1, 255]` | `[1, 65535]` | :x: (type too small) | :x: (type too small) | 177 | | `int32_t` | `[-127, 127]` | `[-32767, 32767]` | [`-8388607, 8388607]` | `[-2147483647, 2147483647]` | 178 | | `uint32_t` | `[1, 255]` | `[1, 65535]` | `[1, 16777215]` | `[1, 4294967295]` | 179 | | `int64_t` | `[-127, 127]` | `[-32767, 32767]` | [`-8388607, 8388607]` | `[-2147483647, 2147483647]` | 180 | | `uint64_t` | `[1, 255]` | `[1, 65535]` | `[1, 16777215]` | `[1, 4294967295]` | 181 | 182 | ## Error Messages 183 | 184 | By default, the library logs error messages to the console to provide information on what has gone wrong (e.g. a file we tried to load didn't exist). 185 | 186 | If you prefer not to see these messages, you can disable this error logging behaviour using: 187 | 188 | audioFile.shouldLogErrorsToConsole (false); 189 | 190 | ## Versions 191 | 192 | ##### 1.1.3 - 31st May 2025 193 | 194 | - Added saveToMemory() function to save audio data to bytes 195 | - Bug fixes and extra testing 196 | 197 | ##### 1.1.2 - 18th November 2024 198 | 199 | - Improved AIFF sample rate calculations 200 | - Improved CMake support 201 | - Code improvements 202 | - Bug and warning fixes 203 | 204 | ##### 1.1.1 - 4th April 2023 205 | 206 | - Support for integer formats 207 | - Improved unit testing 208 | - Many bug fixes 209 | 210 | ##### 1.1.0 - 15th January 2022 211 | 212 | - Moved project to MIT licence 213 | - Added option to load an audio file already in memory 214 | - CI Workflow improvements and bug fixes 215 | 216 | ##### 1.0.9 - 23rd January 2021 217 | 218 | - Faster loading of audio files 219 | - Bug fixes 220 | 221 | ##### 1.0.8 - 18th October 2020 222 | 223 | - CMake support 224 | - Construct instances with a file path 225 | - Bug fixes 226 | 227 | ##### 1.0.7 - 3rd July 2020 228 | 229 | - Support for 32-bit audio files 230 | - Support for multi-channel audio files 231 | - Reading/writing of [iXML data chunks](http://www.ixml.info/) 232 | 233 | ##### 1.0.6 - 29th February 2020 234 | 235 | - Made error logging to the console optional 236 | - Fixed lots of compiler warnings 237 | 238 | ##### 1.0.5 - 14th October 2019 239 | 240 | - Added include of to better support Visual Studio 241 | 242 | ##### 1.0.4 - 13th October 2019 243 | 244 | - Changed to a header-only library. Now you can just include AudioFile.h 245 | - Bug fixes 246 | 247 | ##### 1.0.3 - 28th October 2018 248 | 249 | - Bug fixes 250 | - Documentation updates 251 | 252 | ##### 1.0.2 - 6th June 2017 253 | 254 | - Bug fixes 255 | 256 | ## Contributions 257 | 258 | Many thanks to the following people for their contributions to this library: 259 | 260 | - [Abhinav1997](https://github.com/Abhinav1997) 261 | - [alxarsenault](https://github.com/alxarsenault) 262 | - [ascii255](https://github.com/ascii255) 263 | - [BenjaminHinchliff](https://github.com/BenjaminHinchliff) 264 | - [BesselJ](https://github.com/BesselJ) 265 | - [cgraf78](https://github.com/cgraf78) 266 | - [emiro85](https://github.com/emiro85) 267 | - [encoded](https://github.com/encoded) 268 | - [gitelope](https://github.com/gitelope) 269 | - [heartofrain](https://github.com/heartofrain) 270 | - [helloimmatt](https://github.com/helloimmatt/) 271 | - [leocstone](https://github.com/leocstone) 272 | - [MatthieuHernandez](https://github.com/MatthieuHernandez) 273 | - [Metalsofa](https://github.com/Metalsofa) 274 | - [mrpossoms](https://github.com/mrpossoms) 275 | - [mynameisjohn](https://github.com/mynameisjohn) 276 | - [nicmell](https://github.com/nicmell) 277 | - [Sidelobe](https://github.com/Sidelobe) 278 | - [sschaetz](https://github.com/sschaetz) 279 | - [Yhcrown](https://github.com/Yhcrown) 280 | 281 | ## Want to Contribute? 282 | 283 | If you would like to submit a pull request for this library, please do! But kindly follow the following simple guidelines... 284 | 285 | - Make the changes as concise as is possible for the change you are proposing 286 | - Avoid unnecessarily changing a large number of lines - e.g. commits changing the number of spaces in indentations on all lines (and so on) 287 | - Keep to the code style of this library which is the [JUCE Coding Standards](https://juce.com/discover/stories/coding-standards) 288 | - Make the changes relative to the develop branch of the library (as this may have advanced beyond the master branch) 289 | 290 | ## License 291 | 292 | MIT License 293 | 294 | Copyright (c) 2017 Adam Stark 295 | 296 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 297 | 298 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 299 | 300 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 301 | -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file (COPY test-audio.wav DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 2 | 3 | set (AUDIOFILE_EXAMPLE Example) 4 | 5 | file (GLOB AUDIOFILE_EXAMPLES_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") 6 | source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${AUDIOFILE_EXAMPLES_SOURCES}) 7 | 8 | add_executable (${AUDIOFILE_EXAMPLE} ${AUDIOFILE_EXAMPLES_SOURCES}) 9 | target_link_libraries (${AUDIOFILE_EXAMPLE} PUBLIC AudioFile) 10 | target_compile_definitions (${AUDIOFILE_EXAMPLE} PUBLIC 11 | -D_USE_MATH_DEFINES # needed for M_PI macro 12 | -DPROJECT_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}") -------------------------------------------------------------------------------- /examples/examples.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | //======================================================================= 6 | namespace examples 7 | { 8 | void writeSineWaveToAudioFile(); 9 | void loadAudioFileAndPrintSummary(); 10 | void loadAudioFileAndProcessSamples(); 11 | } 12 | 13 | //======================================================================= 14 | int main() 15 | { 16 | //--------------------------------------------------------------- 17 | /** Writes a sine wave to an audio file */ 18 | examples::writeSineWaveToAudioFile(); 19 | 20 | //--------------------------------------------------------------- 21 | /** Loads an audio file and prints key details to the console*/ 22 | examples::loadAudioFileAndPrintSummary(); 23 | 24 | //--------------------------------------------------------------- 25 | /** Loads an audio file and processess the samples */ 26 | examples::loadAudioFileAndProcessSamples(); 27 | 28 | return 0; 29 | } 30 | 31 | //======================================================================= 32 | namespace examples 33 | { 34 | //======================================================================= 35 | void writeSineWaveToAudioFile() 36 | { 37 | //--------------------------------------------------------------- 38 | std::cout << "**********************" << std::endl; 39 | std::cout << "Running Example: Write Sine Wave To Audio File" << std::endl; 40 | std::cout << "**********************" << std::endl << std::endl; 41 | 42 | //--------------------------------------------------------------- 43 | // 1. Let's setup our AudioFile instance 44 | 45 | AudioFile a; 46 | a.setNumChannels (2); 47 | a.setNumSamplesPerChannel (44100); 48 | 49 | //--------------------------------------------------------------- 50 | // 2. Create some variables to help us generate a sine wave 51 | 52 | const float sampleRate = 44100.f; 53 | const float frequencyInHz = 440.f; 54 | 55 | //--------------------------------------------------------------- 56 | // 3. Write the samples to the AudioFile sample buffer 57 | 58 | for (int i = 0; i < a.getNumSamplesPerChannel(); i++) 59 | { 60 | for (int channel = 0; channel < a.getNumChannels(); channel++) 61 | { 62 | a.samples[channel][i] = sin ((static_cast (i) / sampleRate) * frequencyInHz * 2.f * (float)M_PI); 63 | } 64 | } 65 | 66 | //--------------------------------------------------------------- 67 | // 4. Save the AudioFile 68 | 69 | std::string filePath = "sine-wave.wav"; // change this to somewhere useful for you 70 | a.save ("sine-wave.wav", AudioFileFormat::Wave); 71 | } 72 | 73 | //======================================================================= 74 | void loadAudioFileAndPrintSummary() 75 | { 76 | //--------------------------------------------------------------- 77 | std::cout << "**********************" << std::endl; 78 | std::cout << "Running Example: Load Audio File and Print Summary" << std::endl; 79 | std::cout << "**********************" << std::endl << std::endl; 80 | 81 | //--------------------------------------------------------------- 82 | // 1. Set a file path to an audio file on your machine 83 | const std::string filePath = std::string (PROJECT_BINARY_DIR) + "/test-audio.wav"; 84 | 85 | //--------------------------------------------------------------- 86 | // 2. Create an AudioFile object and load the audio file 87 | 88 | AudioFile a; 89 | bool loadedOK = a.load (filePath); 90 | 91 | /** If you hit this assert then the file path above 92 | probably doesn't refer to a valid audio file */ 93 | assert (loadedOK); 94 | 95 | //--------------------------------------------------------------- 96 | // 3. Let's print out some key details 97 | 98 | std::cout << "Bit Depth: " << a.getBitDepth() << std::endl; 99 | std::cout << "Sample Rate: " << a.getSampleRate() << std::endl; 100 | std::cout << "Num Channels: " << a.getNumChannels() << std::endl; 101 | std::cout << "Length in Seconds: " << a.getLengthInSeconds() << std::endl; 102 | std::cout << std::endl; 103 | } 104 | 105 | //======================================================================= 106 | void loadAudioFileAndProcessSamples() 107 | { 108 | //--------------------------------------------------------------- 109 | std::cout << "**********************" << std::endl; 110 | std::cout << "Running Example: Load Audio File and Process Samples" << std::endl; 111 | std::cout << "**********************" << std::endl << std::endl; 112 | 113 | //--------------------------------------------------------------- 114 | // 1. Set a file path to an audio file on your machine 115 | const std::string inputFilePath = std::string (PROJECT_BINARY_DIR) + "/test-audio.wav"; 116 | 117 | //--------------------------------------------------------------- 118 | // 2. Create an AudioFile object and load the audio file 119 | 120 | AudioFile a; 121 | bool loadedOK = a.load (inputFilePath); 122 | 123 | /** If you hit this assert then the file path above 124 | probably doesn't refer to a valid audio file */ 125 | assert (loadedOK); 126 | 127 | //--------------------------------------------------------------- 128 | // 3. Let's apply a gain to every audio sample 129 | 130 | float gain = 0.5f; 131 | 132 | for (int i = 0; i < a.getNumSamplesPerChannel(); i++) 133 | { 134 | for (int channel = 0; channel < a.getNumChannels(); channel++) 135 | { 136 | a.samples[channel][i] = a.samples[channel][i] * gain; 137 | } 138 | } 139 | 140 | //--------------------------------------------------------------- 141 | // 4. Write audio file to disk 142 | 143 | std::string outputFilePath = "quieter-audio-file.wav"; // change this to somewhere useful for you 144 | a.save (outputFilePath, AudioFileFormat::Wave); 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /examples/test-audio.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/examples/test-audio.wav -------------------------------------------------------------------------------- /tests/AiffLoadingTests.cpp: -------------------------------------------------------------------------------- 1 | #include "doctest/doctest.h" 2 | #include 3 | #include 4 | #include 5 | 6 | // -------------------------------------------- 7 | // Test audio files: 44.1kHz Stereo 8 | #include "test-headers/aiff_stereo_8bit_44100.h" 9 | #include "test-headers/aiff_stereo_16bit_44100.h" 10 | #include "test-headers/aiff_stereo_24bit_44100.h" 11 | #include "test-headers/aiff_stereo_32bit_44100.h" 12 | 13 | // -------------------------------------------- 14 | // Test audio files: 48kHz Stereo 15 | #include "test-headers/aiff_stereo_8bit_48000.h" 16 | #include "test-headers/aiff_stereo_16bit_48000.h" 17 | #include "test-headers/aiff_stereo_24bit_48000.h" 18 | #include "test-headers/aiff_stereo_32bit_48000.h" 19 | 20 | //============================================================= 21 | const std::string projectBuildDirectory = PROJECT_BINARY_DIR; 22 | 23 | //============================================================= 24 | TEST_SUITE ("AiffLoadingTests - Floating Point Types - 8-bit File") 25 | { 26 | //============================================================= 27 | TEST_CASE ("AiffLoadingTests_Stereo_8bit_44100") 28 | { 29 | AudioFile audioFile; 30 | bool loadedOK = audioFile.load (projectBuildDirectory + "/test-audio/aiff_stereo_8bit_44100.aif"); 31 | 32 | CHECK (loadedOK); 33 | CHECK_EQ (audioFile.getNumSamplesPerChannel(), aiff_stereo_8bit_44100::numSamplesPerChannel); 34 | CHECK_EQ (audioFile.getBitDepth(), aiff_stereo_8bit_44100::bitDepth); 35 | CHECK_EQ (audioFile.getSampleRate(), aiff_stereo_8bit_44100::sampleRate); 36 | CHECK_EQ (audioFile.getNumChannels(), aiff_stereo_8bit_44100::numChannels); 37 | 38 | for (size_t i = 0; i < aiff_stereo_8bit_44100::testBuffer[0].size(); i++) 39 | { 40 | for (int k = 0; k < audioFile.getNumChannels(); k++) 41 | { 42 | CHECK (audioFile.samples[k][i] == doctest::Approx (aiff_stereo_8bit_44100::testBuffer[k][i]).epsilon (0.01)); 43 | } 44 | } 45 | } 46 | 47 | //============================================================= 48 | TEST_CASE ("AiffLoadingTests_Stereo_8bit_48000") 49 | { 50 | AudioFile audioFile; 51 | bool loadedOK = audioFile.load (projectBuildDirectory + "/test-audio/aiff_stereo_8bit_48000.aif"); 52 | 53 | CHECK (loadedOK); 54 | CHECK_EQ (audioFile.getNumSamplesPerChannel(), aiff_stereo_8bit_48000::numSamplesPerChannel); 55 | CHECK_EQ (audioFile.getBitDepth(), aiff_stereo_8bit_48000::bitDepth); 56 | CHECK_EQ (audioFile.getSampleRate(), aiff_stereo_8bit_48000::sampleRate); 57 | CHECK_EQ (audioFile.getNumChannels(), aiff_stereo_8bit_48000::numChannels); 58 | 59 | for (size_t i = 0; i < aiff_stereo_8bit_48000::testBuffer[0].size(); i++) 60 | { 61 | for (int k = 0; k < audioFile.getNumChannels(); k++) 62 | { 63 | CHECK (audioFile.samples[k][i] == doctest::Approx (aiff_stereo_8bit_48000::testBuffer[k][i]).epsilon (0.01)); 64 | } 65 | } 66 | } 67 | } 68 | 69 | //============================================================= 70 | TEST_SUITE ("AiffLoadingTests - Floating Point Types - 16-bit File") 71 | { 72 | //============================================================= 73 | TEST_CASE ("AiffLoadingTests_Stereo_16bit_44100") 74 | { 75 | AudioFile audioFile; 76 | bool loadedOK = audioFile.load (projectBuildDirectory + "/test-audio/aiff_stereo_16bit_44100.aif"); 77 | 78 | CHECK (loadedOK); 79 | CHECK_EQ (audioFile.getNumSamplesPerChannel(), aiff_stereo_16bit_44100::numSamplesPerChannel); 80 | CHECK_EQ (audioFile.getBitDepth(), aiff_stereo_16bit_44100::bitDepth); 81 | CHECK_EQ (audioFile.getSampleRate(), aiff_stereo_16bit_44100::sampleRate); 82 | CHECK_EQ (audioFile.getNumChannels(), aiff_stereo_16bit_44100::numChannels); 83 | 84 | for (size_t i = 0; i < aiff_stereo_16bit_44100::testBuffer[0].size(); i++) 85 | { 86 | for (int k = 0; k < audioFile.getNumChannels(); k++) 87 | { 88 | CHECK (audioFile.samples[k][i] == doctest::Approx (aiff_stereo_16bit_44100::testBuffer[k][i]).epsilon (0.00001)); 89 | } 90 | } 91 | } 92 | 93 | //============================================================= 94 | TEST_CASE ("AiffLoadingTests_Stereo_16bit_48000") 95 | { 96 | AudioFile audioFile; 97 | bool loadedOK = audioFile.load (projectBuildDirectory + "/test-audio/aiff_stereo_16bit_48000.aif"); 98 | 99 | CHECK (loadedOK); 100 | CHECK_EQ (audioFile.getNumSamplesPerChannel(), aiff_stereo_16bit_48000::numSamplesPerChannel); 101 | CHECK_EQ (audioFile.getBitDepth(), aiff_stereo_16bit_48000::bitDepth); 102 | CHECK_EQ (audioFile.getSampleRate(), aiff_stereo_16bit_48000::sampleRate); 103 | CHECK_EQ (audioFile.getNumChannels(), aiff_stereo_16bit_48000::numChannels); 104 | 105 | for (size_t i = 0; i < aiff_stereo_16bit_48000::testBuffer[0].size(); i++) 106 | { 107 | for (int k = 0; k < audioFile.getNumChannels(); k++) 108 | { 109 | CHECK (audioFile.samples[k][i] == doctest::Approx (aiff_stereo_16bit_48000::testBuffer[k][i]).epsilon (0.00001)); 110 | } 111 | } 112 | } 113 | } 114 | 115 | //============================================================= 116 | TEST_SUITE ("AiffLoadingTests - Floating Point Types - 24-bit File") 117 | { 118 | //============================================================= 119 | TEST_CASE ("AiffLoadingTests_Stereo_24bit_44100") 120 | { 121 | AudioFile audioFile; 122 | bool loadedOK = audioFile.load (projectBuildDirectory + "/test-audio/aiff_stereo_24bit_44100.aif"); 123 | 124 | CHECK (loadedOK); 125 | CHECK_EQ (audioFile.getNumSamplesPerChannel(), aiff_stereo_24bit_44100::numSamplesPerChannel); 126 | CHECK_EQ (audioFile.getBitDepth(), aiff_stereo_24bit_44100::bitDepth); 127 | CHECK_EQ (audioFile.getSampleRate(), aiff_stereo_24bit_44100::sampleRate); 128 | CHECK_EQ (audioFile.getNumChannels(), aiff_stereo_24bit_44100::numChannels); 129 | 130 | for (size_t i = 0; i < aiff_stereo_24bit_44100::testBuffer[0].size(); i++) 131 | { 132 | for (int k = 0; k < audioFile.getNumChannels(); k++) 133 | { 134 | CHECK (audioFile.samples[k][i] == doctest::Approx (aiff_stereo_24bit_44100::testBuffer[k][i]).epsilon (0.00001)); 135 | } 136 | } 137 | } 138 | 139 | //============================================================= 140 | TEST_CASE ("AiffLoadingTests_Stereo_24bit_48000") 141 | { 142 | AudioFile audioFile; 143 | bool loadedOK = audioFile.load (projectBuildDirectory + "/test-audio/aiff_stereo_24bit_48000.aif"); 144 | 145 | CHECK (loadedOK); 146 | CHECK_EQ (audioFile.getNumSamplesPerChannel(), aiff_stereo_24bit_48000::numSamplesPerChannel); 147 | CHECK_EQ (audioFile.getBitDepth(), aiff_stereo_24bit_48000::bitDepth); 148 | CHECK_EQ (audioFile.getSampleRate(), aiff_stereo_24bit_48000::sampleRate); 149 | CHECK_EQ (audioFile.getNumChannels(), aiff_stereo_24bit_48000::numChannels); 150 | 151 | for (size_t i = 0; i < aiff_stereo_24bit_48000::testBuffer[0].size(); i++) 152 | { 153 | for (int k = 0; k < audioFile.getNumChannels(); k++) 154 | { 155 | CHECK (audioFile.samples[k][i] == doctest::Approx (aiff_stereo_24bit_48000::testBuffer[k][i]).epsilon (0.00001)); 156 | } 157 | } 158 | } 159 | } 160 | 161 | //============================================================= 162 | TEST_SUITE ("AiffLoadingTests - Floating Point Types - 32-bit File") 163 | { 164 | //============================================================= 165 | TEST_CASE ("AiffLoadingTests_Stereo_32bit_44100") 166 | { 167 | AudioFile audioFile; 168 | bool loadedOK = audioFile.load (projectBuildDirectory + "/test-audio/aiff_stereo_32bit_44100.aif"); 169 | 170 | CHECK (loadedOK); 171 | CHECK_EQ (audioFile.getNumSamplesPerChannel(), aiff_stereo_32bit_44100::numSamplesPerChannel); 172 | CHECK_EQ (audioFile.getBitDepth(), aiff_stereo_32bit_44100::bitDepth); 173 | CHECK_EQ (audioFile.getSampleRate(), aiff_stereo_32bit_44100::sampleRate); 174 | CHECK_EQ (audioFile.getNumChannels(), aiff_stereo_32bit_44100::numChannels); 175 | 176 | for (size_t i = 0; i < aiff_stereo_32bit_44100::testBuffer[0].size(); i++) 177 | { 178 | for (int k = 0; k < audioFile.getNumChannels(); k++) 179 | { 180 | CHECK (audioFile.samples[k][i] == doctest::Approx (aiff_stereo_32bit_44100::testBuffer[k][i]).epsilon (0.00001)); 181 | } 182 | } 183 | } 184 | 185 | //============================================================= 186 | TEST_CASE ("AiffLoadingTests_Stereo_32bit_48000") 187 | { 188 | AudioFile audioFile; 189 | bool loadedOK = audioFile.load (projectBuildDirectory + "/test-audio/aiff_stereo_32bit_48000.aif"); 190 | 191 | CHECK (loadedOK); 192 | CHECK_EQ (audioFile.getNumSamplesPerChannel(), aiff_stereo_32bit_48000::numSamplesPerChannel); 193 | CHECK_EQ (audioFile.getBitDepth(), aiff_stereo_32bit_48000::bitDepth); 194 | CHECK_EQ (audioFile.getSampleRate(), aiff_stereo_32bit_48000::sampleRate); 195 | CHECK_EQ (audioFile.getNumChannels(), aiff_stereo_32bit_48000::numChannels); 196 | 197 | for (size_t i = 0; i < aiff_stereo_32bit_48000::testBuffer[0].size(); i++) 198 | { 199 | for (int k = 0; k < audioFile.getNumChannels(); k++) 200 | { 201 | CHECK (audioFile.samples[k][i] == doctest::Approx (aiff_stereo_32bit_48000::testBuffer[k][i]).epsilon (0.00001)); 202 | } 203 | } 204 | } 205 | } 206 | 207 | //============================================================= 208 | TEST_SUITE ("AiffLoadingTests - Integer Types - 8-bit File") 209 | { 210 | //============================================================= 211 | template 212 | void test8Bit44100WithInteger (bool expectFailure = false) 213 | { 214 | AudioFile audioFile; 215 | bool loadedOK = audioFile.load (projectBuildDirectory + "/test-audio/aiff_stereo_8bit_44100.aif"); 216 | 217 | CHECK (loadedOK); 218 | CHECK_EQ (audioFile.getNumSamplesPerChannel(), aiff_stereo_8bit_44100::numSamplesPerChannel); 219 | CHECK_EQ (audioFile.getBitDepth(), aiff_stereo_8bit_44100::bitDepth); 220 | CHECK_EQ (audioFile.getSampleRate(), aiff_stereo_8bit_44100::sampleRate); 221 | CHECK_EQ (audioFile.getNumChannels(), aiff_stereo_8bit_44100::numChannels); 222 | 223 | int offset = std::is_signed_v ? 0 : 128; 224 | 225 | for (size_t i = 0; i < aiff_stereo_8bit_44100::testBuffer[0].size(); i++) 226 | { 227 | for (int k = 0; k < audioFile.getNumChannels(); k++) 228 | { 229 | CHECK (audioFile.samples[k][i] == doctest::Approx (aiff_stereo_8bit_44100::testBuffer[k][i] * 127 + offset).epsilon (0.01)); 230 | } 231 | } 232 | } 233 | 234 | //============================================================= 235 | TEST_CASE ("AiffLoadingTests_Stereo_8bit_44100_integers") 236 | { 237 | test8Bit44100WithInteger(); 238 | test8Bit44100WithInteger(); 239 | test8Bit44100WithInteger(); 240 | test8Bit44100WithInteger(); 241 | test8Bit44100WithInteger(); 242 | test8Bit44100WithInteger(); 243 | test8Bit44100WithInteger(); 244 | test8Bit44100WithInteger(); 245 | } 246 | } 247 | 248 | //============================================================= 249 | TEST_SUITE ("AiffLoadingTests - Integer Types - 16-bit File") 250 | { 251 | //============================================================= 252 | template 253 | void test16Bit44100WithInteger (bool expectFailure = false) 254 | { 255 | AudioFile audioFile; 256 | 257 | if (expectFailure) 258 | audioFile.shouldLogErrorsToConsole (false); 259 | 260 | bool loadedOK = audioFile.load (projectBuildDirectory + "/test-audio/aiff_stereo_16bit_44100.aif"); 261 | 262 | if (expectFailure) 263 | { 264 | CHECK_EQ (loadedOK, false); 265 | return; 266 | } 267 | 268 | CHECK (loadedOK); 269 | CHECK_EQ (audioFile.getNumSamplesPerChannel(), aiff_stereo_16bit_44100::numSamplesPerChannel); 270 | CHECK_EQ (audioFile.getBitDepth(), aiff_stereo_16bit_44100::bitDepth); 271 | CHECK_EQ (audioFile.getSampleRate(), aiff_stereo_16bit_44100::sampleRate); 272 | CHECK_EQ (audioFile.getNumChannels(), aiff_stereo_16bit_44100::numChannels); 273 | 274 | int offset = std::is_signed_v ? 0 : 32768; 275 | 276 | for (size_t i = 0; i < aiff_stereo_16bit_44100::testBuffer[0].size(); i++) 277 | { 278 | for (int k = 0; k < audioFile.getNumChannels(); k++) 279 | { 280 | CHECK (audioFile.samples[k][i] == doctest::Approx (aiff_stereo_16bit_44100::testBuffer[k][i] * 32767 + offset).epsilon (0.0001)); 281 | } 282 | } 283 | } 284 | 285 | //============================================================= 286 | TEST_CASE ("AiffLoadingTests_Stereo_16bit_44100_integers") 287 | { 288 | test16Bit44100WithInteger(); 289 | test16Bit44100WithInteger(); 290 | test16Bit44100WithInteger(); 291 | test16Bit44100WithInteger(); 292 | test16Bit44100WithInteger(); 293 | test16Bit44100WithInteger(); 294 | 295 | // check these fail... 296 | test16Bit44100WithInteger (true); 297 | test16Bit44100WithInteger (true); 298 | } 299 | } 300 | 301 | //============================================================= 302 | TEST_SUITE ("AiffLoadingTests - Integer Types - 24-bit File") 303 | { 304 | //============================================================= 305 | template 306 | void test24Bit44100WithInteger (bool expectFailure = false) 307 | { 308 | AudioFile audioFile; 309 | 310 | if (expectFailure) 311 | audioFile.shouldLogErrorsToConsole (false); 312 | 313 | bool loadedOK = audioFile.load (projectBuildDirectory + "/test-audio/aiff_stereo_24bit_44100.aif"); 314 | 315 | if (expectFailure) 316 | { 317 | REQUIRE_EQ (loadedOK, false); 318 | return; 319 | } 320 | 321 | CHECK (loadedOK); 322 | CHECK_EQ (audioFile.getNumSamplesPerChannel(), aiff_stereo_24bit_44100::numSamplesPerChannel); 323 | CHECK_EQ (audioFile.getBitDepth(), aiff_stereo_24bit_44100::bitDepth); 324 | CHECK_EQ (audioFile.getSampleRate(), aiff_stereo_24bit_44100::sampleRate); 325 | CHECK_EQ (audioFile.getNumChannels(), aiff_stereo_24bit_44100::numChannels); 326 | 327 | int offset = std::is_signed_v ? 0 : 8388608; 328 | 329 | for (size_t i = 0; i < aiff_stereo_24bit_44100::testBuffer[0].size(); i++) 330 | { 331 | for (int k = 0; k < audioFile.getNumChannels(); k++) 332 | { 333 | CHECK (audioFile.samples[k][i] == doctest::Approx (aiff_stereo_24bit_44100::testBuffer[k][i] * 8388607 + offset).epsilon (0.00001)); 334 | } 335 | } 336 | } 337 | 338 | //============================================================= 339 | TEST_CASE ("AiffLoadingTests_Stereo_24bit_44100_integers") 340 | { 341 | test24Bit44100WithInteger(); 342 | test24Bit44100WithInteger(); 343 | test24Bit44100WithInteger(); 344 | test24Bit44100WithInteger(); 345 | 346 | // check these fail... 347 | test24Bit44100WithInteger (true); 348 | test24Bit44100WithInteger (true); 349 | test24Bit44100WithInteger (true); 350 | test24Bit44100WithInteger (true); 351 | } 352 | } 353 | 354 | //============================================================= 355 | TEST_SUITE ("AiffLoadingTests - Sample Rates") 356 | { 357 | //============================================================= 358 | TEST_CASE ("AiffLoadingTests - Sample Rates - Common Sample Rates") 359 | { 360 | // Pre-defined 10-byte representations of common sample rates 361 | std::unordered_map > aiffSampleRateTable = { 362 | {8000, {64, 11, 250, 0, 0, 0, 0, 0, 0, 0}}, 363 | {11025, {64, 12, 172, 68, 0, 0, 0, 0, 0, 0}}, 364 | {16000, {64, 12, 250, 0, 0, 0, 0, 0, 0, 0}}, 365 | {22050, {64, 13, 172, 68, 0, 0, 0, 0, 0, 0}}, 366 | {32000, {64, 13, 250, 0, 0, 0, 0, 0, 0, 0}}, 367 | {37800, {64, 14, 147, 168, 0, 0, 0, 0, 0, 0}}, 368 | {44056, {64, 14, 172, 24, 0, 0, 0, 0, 0, 0}}, 369 | {44100, {64, 14, 172, 68, 0, 0, 0, 0, 0, 0}}, 370 | {47250, {64, 14, 184, 146, 0, 0, 0, 0, 0, 0}}, 371 | {48000, {64, 14, 187, 128, 0, 0, 0, 0, 0, 0}}, 372 | {50000, {64, 14, 195, 80, 0, 0, 0, 0, 0, 0}}, 373 | {50400, {64, 14, 196, 224, 0, 0, 0, 0, 0, 0}}, 374 | {88200, {64, 15, 172, 68, 0, 0, 0, 0, 0, 0}}, 375 | {96000, {64, 15, 187, 128, 0, 0, 0, 0, 0, 0}}, 376 | {176400, {64, 16, 172, 68, 0, 0, 0, 0, 0, 0}}, 377 | {192000, {64, 16, 187, 128, 0, 0, 0, 0, 0, 0}}, 378 | {352800, {64, 17, 172, 68, 0, 0, 0, 0, 0, 0}}, 379 | {2822400, {64, 20, 172, 68, 0, 0, 0, 0, 0, 0}}, 380 | {5644800, {64, 21, 172, 68, 0, 0, 0, 0, 0, 0}} 381 | }; 382 | 383 | std::vector sampleRateBytes (10); 384 | 385 | for (const auto& pair : aiffSampleRateTable) 386 | { 387 | uint32_t sampleRate = pair.first; 388 | double inputSampleRate = sampleRate; 389 | 390 | // encode into bytes 391 | AiffUtilities::encodeAiffSampleRate (static_cast (sampleRate), sampleRateBytes.data()); 392 | 393 | for (int i = 0; i < 10; i++) 394 | CHECK_EQ (sampleRateBytes[i], aiffSampleRateTable[sampleRate][i]); 395 | 396 | double outputSampleRate = AiffUtilities::decodeAiffSampleRate (aiffSampleRateTable[sampleRate].data()); 397 | 398 | CHECK_EQ (inputSampleRate, outputSampleRate); 399 | } 400 | } 401 | 402 | //============================================================= 403 | TEST_CASE ("AiffLoadingTests - Sample Rates - Round Trip Encode/Decode Tests") 404 | { 405 | std::vector sampleRateBytes (10); 406 | 407 | for (int i = -100000; i < 100000; i += 237) // + odd number to reduce cycles but check odd and even values 408 | { 409 | double input = static_cast (i); 410 | AiffUtilities::encodeAiffSampleRate (input, sampleRateBytes.data()); 411 | double output = AiffUtilities::decodeAiffSampleRate (sampleRateBytes.data()); 412 | CHECK_EQ (input, output); 413 | } 414 | } 415 | } 416 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file (COPY test-audio DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 2 | file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/audio-write-tests) 3 | 4 | set (AUDIOFILE_TESTS Tests) 5 | 6 | file (GLOB AUDIOFILE_TESTS_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") 7 | source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${AUDIOFILE_TESTS_SOURCES}) 8 | 9 | add_executable (${AUDIOFILE_TESTS} ${AUDIOFILE_TESTS_SOURCES}) 10 | target_include_directories (${AUDIOFILE_TESTS} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) 11 | target_link_libraries (${AUDIOFILE_TESTS} PUBLIC AudioFile) 12 | target_compile_features (${AUDIOFILE_TESTS} PRIVATE cxx_std_17) 13 | target_compile_definitions (${AUDIOFILE_TESTS} PUBLIC 14 | -D_USE_MATH_DEFINES # needed for M_PI macro 15 | -DPROJECT_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}") 16 | 17 | add_test (NAME ${AUDIOFILE_TESTS} COMMAND ${AUDIOFILE_TESTS}) -------------------------------------------------------------------------------- /tests/FileWritingTests.cpp: -------------------------------------------------------------------------------- 1 | #include "doctest/doctest.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | //============================================================= 8 | const std::string projectBuildDirectory = PROJECT_BINARY_DIR; 9 | 10 | //============================================================= 11 | // Writes an audio file with a given number of channels, sample rate, bit depth and format 12 | // Returns true if it was successful 13 | template 14 | void writeTestAudioFile (int numChannels, int sampleRate, int bitDepth, AudioFileFormat format) 15 | { 16 | std::string sampleType; 17 | float sampleRateAsFloat = (float) sampleRate; 18 | 19 | AudioFile audioFileWriter; 20 | 21 | audioFileWriter.setAudioBufferSize (numChannels, sampleRate * 4); 22 | 23 | // In the case of an integer representation, this value will be 24 | T maxValue; 25 | 26 | if constexpr (std::is_floating_point::value) 27 | { 28 | maxValue = 1; 29 | sampleType = "floating_point"; 30 | } 31 | else if constexpr (std::numeric_limits::is_integer) 32 | { 33 | if constexpr (std::is_signed_v) 34 | { 35 | sampleType = "integer (signed, " + std::to_string (sizeof (T) * 8) + "-bit)"; 36 | maxValue = pow (2, bitDepth - 1) - 1; 37 | } 38 | else 39 | { 40 | sampleType = "integer (unsigned, " + std::to_string (sizeof (T) * 8) + "-bit)"; 41 | maxValue = pow (2, bitDepth) - 1; 42 | } 43 | } 44 | 45 | for (int i = 0; i < audioFileWriter.getNumSamplesPerChannel(); i++) 46 | { 47 | T sample; 48 | 49 | if constexpr (std::numeric_limits::is_integer && std::is_unsigned_v) 50 | sample = (T)(((sinf (2. * M_PI * ((double) i / sampleRateAsFloat) * 440.) + 1.) / 2.) * maxValue); 51 | else 52 | sample = (T)(sinf (2. * M_PI * ((double) i / sampleRateAsFloat) * 440.) * maxValue); 53 | 54 | for (int k = 0; k < audioFileWriter.getNumChannels(); k++) 55 | audioFileWriter.samples[k][i] = sample * 0.5f; 56 | } 57 | 58 | audioFileWriter.setSampleRate (sampleRate); 59 | audioFileWriter.setBitDepth (bitDepth); 60 | 61 | std::string numChannelsAsString; 62 | if (numChannels == 1) 63 | numChannelsAsString = "mono"; 64 | else if (numChannels == 2) 65 | numChannelsAsString = "stereo"; 66 | else 67 | numChannelsAsString = std::to_string (numChannels) + " channels"; 68 | 69 | std::string bitDepthAsString = std::to_string (bitDepth); 70 | std::string sampleRateAsString = std::to_string (sampleRate); 71 | 72 | std::string filePath; 73 | 74 | if (format == AudioFileFormat::Wave) 75 | { 76 | filePath = projectBuildDirectory + "/audio-write-tests/" + sampleType + "_" + numChannelsAsString + "_" + sampleRateAsString + "_" + bitDepthAsString + "bit" + ".wav"; 77 | } 78 | else if (format == AudioFileFormat::Aiff) 79 | { 80 | filePath = projectBuildDirectory + "/audio-write-tests/" + sampleType + "_" + numChannelsAsString + "_" + sampleRateAsString + "_" + bitDepthAsString + "bit" + ".aif"; 81 | 82 | } 83 | 84 | bool OK = audioFileWriter.save (filePath, format); 85 | REQUIRE (OK); 86 | 87 | //----------------------------------------------------------------- 88 | // read in the audio file we just wrote and do a sample-by-sample 89 | // comparison to confirm we are writing good files 90 | if (numChannels <= 2) 91 | { 92 | AudioFile audioFileReader; 93 | audioFileReader.load (filePath); 94 | 95 | // confirm num channels 96 | CHECK (audioFileReader.getNumChannels() == audioFileWriter.getNumChannels()); 97 | 98 | // confirm bit depth 99 | CHECK (audioFileReader.getBitDepth() == audioFileWriter.getBitDepth()); 100 | 101 | // confirm sample rate 102 | CHECK (audioFileReader.getSampleRate() == audioFileWriter.getSampleRate()); 103 | 104 | // confirm the number of samples per channel 105 | CHECK (audioFileReader.getNumSamplesPerChannel() == audioFileWriter.getNumSamplesPerChannel()); 106 | 107 | for (size_t i = 0; i < 5000; i++) 108 | { 109 | for (int k = 0; k < audioFileReader.getNumChannels(); k++) 110 | { 111 | // NOTE: We can expect audio files we read back in to differ a small amount from the original due to small rounding errors 112 | REQUIRE (audioFileReader.samples[k][i] == doctest::Approx (audioFileWriter.samples[k][i]).epsilon (0.01)); 113 | } 114 | } 115 | } 116 | } 117 | 118 | //============================================================= 119 | TEST_SUITE ("Writing Tests") 120 | { 121 | //============================================================= 122 | TEST_CASE ("WritingTest::WriteSineToneToManyFormats::FloatingPoint") 123 | { 124 | std::vector sampleRates = {22050, 44100, 48000, 96000}; 125 | std::vector bitDepths = {8, 16, 24, 32}; 126 | std::vector numChannels = {1, 2, 8}; 127 | std::vector audioFormats = {AudioFileFormat::Wave, AudioFileFormat::Aiff}; 128 | 129 | for (auto& sampleRate : sampleRates) 130 | { 131 | for (auto& bitDepth : bitDepths) 132 | { 133 | for (auto& channels : numChannels) 134 | { 135 | for (auto& format : audioFormats) 136 | { 137 | auto fmt_str = format == AudioFileFormat::Wave ? "wav" : "aiff"; 138 | std::cerr << sampleRate << "Hz " << bitDepth << "-bit " << channels << " " << fmt_str << " (float)" << std::endl; 139 | writeTestAudioFile (channels, sampleRate, bitDepth, format); 140 | } 141 | } 142 | } 143 | } 144 | } 145 | 146 | //============================================================= 147 | TEST_CASE ("WritingTest::WriteSineToneToManyFormats::DoublePrecision") 148 | { 149 | std::vector sampleRates = {22050, 44100, 48000, 96000}; 150 | std::vector bitDepths = {8, 16, 24, 32}; 151 | std::vector numChannels = {1, 2, 8}; 152 | std::vector audioFormats = {AudioFileFormat::Wave, AudioFileFormat::Aiff}; 153 | 154 | for (auto& sampleRate : sampleRates) 155 | { 156 | for (auto& bitDepth : bitDepths) 157 | { 158 | for (auto& channels : numChannels) 159 | { 160 | for (auto& format : audioFormats) 161 | { 162 | auto fmt_str = format == AudioFileFormat::Wave ? "wav" : "aiff"; 163 | std::cerr << sampleRate << "Hz " << bitDepth << "-bit " << channels << " " << fmt_str << " (double)" << std::endl; 164 | writeTestAudioFile (channels, sampleRate, bitDepth, format); 165 | } 166 | } 167 | } 168 | } 169 | } 170 | 171 | //============================================================= 172 | TEST_CASE ("WritingTest::WriteSineToneToManyFormats::Integer") 173 | { 174 | std::vector sampleRates = {22050, 44100, 48000, 96000}; 175 | std::vector bitDepths = {8, 16, 24, 32}; 176 | std::vector numChannels = {1, 2}; 177 | std::vector audioFormats = {AudioFileFormat::Wave, AudioFileFormat::Aiff}; 178 | 179 | for (auto& sampleRate : sampleRates) 180 | { 181 | for (auto& bitDepth : bitDepths) 182 | { 183 | for (auto& channels : numChannels) 184 | { 185 | for (auto& format : audioFormats) 186 | { 187 | auto fmt_str = format == AudioFileFormat::Wave ? "wav" : "aiff"; 188 | std::cerr << sampleRate << "Hz " << bitDepth << "-bit " << channels << " " << fmt_str << " (integer)" << std::endl; 189 | 190 | if (bitDepth == 8) 191 | writeTestAudioFile (channels, sampleRate, bitDepth, format); 192 | else if (bitDepth == 16) 193 | writeTestAudioFile (channels, sampleRate, bitDepth, format); 194 | else if (bitDepth == 24) 195 | writeTestAudioFile (channels, sampleRate, bitDepth, format); 196 | else if (bitDepth == 32) 197 | writeTestAudioFile (channels, sampleRate, bitDepth, format); 198 | } 199 | } 200 | } 201 | } 202 | } 203 | 204 | //============================================================= 205 | TEST_CASE ("WritingTest::WriteFromCopiedSampleBuffer") 206 | { 207 | AudioFile audioFile1, audioFile2; 208 | 209 | bool loadedOK = audioFile1.load (projectBuildDirectory + "/test-audio/wav_stereo_16bit_44100.wav"); 210 | CHECK (loadedOK); 211 | 212 | audioFile2.setAudioBuffer (audioFile1.samples); 213 | bool savedOK = audioFile2.save (projectBuildDirectory + "/audio-write-tests/copied_audio_file.aif", AudioFileFormat::Aiff); 214 | CHECK (savedOK); 215 | } 216 | } 217 | -------------------------------------------------------------------------------- /tests/GeneralTests.cpp: -------------------------------------------------------------------------------- 1 | #include "doctest/doctest.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | //============================================================= 8 | TEST_SUITE ("General Tests") 9 | { 10 | //============================================================= 11 | const std::string projectBuildDirectory = PROJECT_BINARY_DIR; 12 | 13 | //============================================================= 14 | template 15 | void checkFilesAreExactlyTheSame (AudioFile& a, AudioFile& b) 16 | { 17 | CHECK (a.getSampleRate() == b.getSampleRate()); 18 | CHECK (a.getBitDepth() == b.getBitDepth()); 19 | CHECK (a.getNumChannels() == b.getNumChannels()); 20 | CHECK (a.getNumSamplesPerChannel() == b.getNumSamplesPerChannel()); 21 | CHECK (a.getLengthInSeconds() == b.getLengthInSeconds()); 22 | 23 | size_t numSamplesToTest = std::min (static_cast (20000), a.samples[0].size()); 24 | 25 | for (size_t channel = 0; channel < a.samples.size(); channel++) 26 | { 27 | for (size_t i = 0; i < numSamplesToTest; i++) 28 | { 29 | CHECK_EQ (a.samples[channel][i], b.samples[channel][i]); 30 | } 31 | } 32 | } 33 | 34 | //============================================================= 35 | TEST_CASE ("GeneralTests::CopyConstructor") 36 | { 37 | AudioFile a; 38 | a.load (projectBuildDirectory + "/test-audio/aiff_stereo_16bit_44100.aif"); 39 | 40 | AudioFile b (a); 41 | 42 | checkFilesAreExactlyTheSame (a, b); 43 | } 44 | 45 | //============================================================= 46 | TEST_CASE ("GeneralTests::CopyAssignmentOperator") 47 | { 48 | AudioFile a; 49 | a.load (projectBuildDirectory + "/test-audio/aiff_stereo_16bit_44100.aif"); 50 | 51 | AudioFile b; 52 | b = a; 53 | 54 | checkFilesAreExactlyTheSame (a, b); 55 | } 56 | 57 | //============================================================= 58 | TEST_CASE ("GeneralTests::MoveAssignmentOperator") 59 | { 60 | AudioFile a; 61 | a.load (projectBuildDirectory + "/test-audio/aiff_stereo_16bit_44100.aif"); 62 | 63 | AudioFile b; 64 | AudioFile c; 65 | b = a; 66 | c = std::move (a); 67 | 68 | checkFilesAreExactlyTheSame (b, c); 69 | } 70 | 71 | //============================================================= 72 | TEST_CASE ("GeneralTests::MoveConstructor") 73 | { 74 | AudioFile a; 75 | a.load (projectBuildDirectory + "/test-audio/aiff_stereo_16bit_44100.aif"); 76 | 77 | AudioFile b; 78 | b = a; 79 | 80 | AudioFile c (std::move (a)); 81 | 82 | checkFilesAreExactlyTheSame (b, c); 83 | } 84 | 85 | //============================================================= 86 | TEST_CASE ("GeneralTests::ConstructFromPath") 87 | { 88 | std::string filePath = projectBuildDirectory + "/test-audio/aiff_stereo_16bit_44100.aif"; 89 | 90 | AudioFile a; 91 | a.load (filePath); 92 | 93 | AudioFile b (filePath); 94 | 95 | checkFilesAreExactlyTheSame (a, b); 96 | } 97 | 98 | //============================================================= 99 | TEST_CASE ("GeneralTests::IntegerFormat") 100 | { 101 | std::string filePath = projectBuildDirectory + "/test-audio/aiff_stereo_16bit_44100.aif"; 102 | 103 | AudioFile a; 104 | a.load (filePath); 105 | 106 | AudioFile b (filePath); 107 | 108 | checkFilesAreExactlyTheSame (a, b); 109 | } 110 | 111 | //============================================================= 112 | TEST_CASE ("GeneralTests::Empty Data") 113 | { 114 | AudioFile a; 115 | a.shouldLogErrorsToConsole (false); 116 | bool result = a.loadFromMemory (std::vector()); 117 | CHECK_EQ (result, false); 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /tests/main.cpp: -------------------------------------------------------------------------------- 1 | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN 2 | #define DOCTEST_CONFIG_COLORS_NONE 3 | #include "doctest/doctest.h" 4 | -------------------------------------------------------------------------------- /tests/makeHeaders.py: -------------------------------------------------------------------------------- 1 | from scikits.audiolab import wavread, aiffread 2 | import sys 3 | import os 4 | 5 | wavFiles = [] 6 | 7 | #================================================================== 8 | def makeHeader (fileName, audioSignal, numChannels, bitRate, sampleRate, fileFormat): 9 | 10 | fileName = fileName.split (".")[0] 11 | variableName = fileName 12 | print fileName, bitRate 13 | numSamples = audioSignal.shape[0] 14 | 15 | header = "" 16 | 17 | header += "#include " 18 | header += "\n\n" 19 | 20 | header += "namespace " + variableName + " { " 21 | header += "\n\n" 22 | 23 | header += "int numSamplesPerChannel = " + str (numSamples) + ";\n" 24 | header += "int bitDepth = " + str(bitRate) + ";\n" 25 | header += "uint32_t sampleRate = " + str(sampleRate) + ";\n" 26 | header += "int numChannels = " + str(numChannels) + ";\n" 27 | header += "\n" 28 | if numChannels == 1: 29 | header += "std::vector testBuffer = " 30 | else: 31 | header += "std::vector> testBuffer = {" 32 | 33 | numSamples = 500 # override to prevent enormous file sizes 34 | 35 | for k in range (numChannels): 36 | 37 | header += "{" 38 | 39 | for i in range (numSamples): 40 | 41 | if numChannels == 1: 42 | header += str (audioSignal[i]) 43 | else: 44 | header += str (audioSignal.T[k][i]) 45 | if i < (numSamples - 1): 46 | header += ", " 47 | 48 | header += "}" 49 | if k < numChannels - 1: 50 | header += ", " 51 | 52 | if numChannels > 1: 53 | header += "}" 54 | 55 | header += ";" 56 | 57 | header += "\n\n" 58 | header += "}; // end namespace" 59 | 60 | text_file = open ("test-headers/" + variableName + ".h", "w") 61 | text_file.write (header) 62 | text_file.close() 63 | 64 | # get all wav files 65 | for fileName in os.listdir("test-audio"): 66 | if fileName.endswith(".wav") or fileName.endswith(".aif"): 67 | 68 | if fileName.endswith(".wav"): 69 | audioSignal, fs, enc = wavread ("test-audio/" + fileName) 70 | fileFormat = "wav" 71 | elif fileName.endswith(".aif"): 72 | audioSignal, fs, enc = aiffread ("test-audio/" + fileName) 73 | fileFormat = "aif" 74 | else: 75 | assert (False) 76 | 77 | if len (audioSignal.shape) == 1: 78 | numChannels = 1 79 | elif len (audioSignal.shape) == 2: 80 | numChannels = audioSignal.shape[1] 81 | else: 82 | assert (False) 83 | 84 | #print fileName, enc 85 | 86 | if enc == "pcmu8" or enc == "pcms8": 87 | makeHeader (fileName, audioSignal, numChannels, 8, fs, fileFormat) 88 | elif enc == "pcm16": 89 | makeHeader (fileName, audioSignal, numChannels, 16, fs, fileFormat) 90 | elif enc == "pcm24": 91 | makeHeader (fileName, audioSignal, numChannels, 24, fs, fileFormat) 92 | elif enc == "float32": 93 | makeHeader (fileName, audioSignal, numChannels, 32, fs, fileFormat) 94 | else: 95 | print "Unknown bit depth:", enc 96 | assert (False) 97 | -------------------------------------------------------------------------------- /tests/test-audio/aiff_stereo_16bit_44100.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/aiff_stereo_16bit_44100.aif -------------------------------------------------------------------------------- /tests/test-audio/aiff_stereo_16bit_48000.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/aiff_stereo_16bit_48000.aif -------------------------------------------------------------------------------- /tests/test-audio/aiff_stereo_24bit_44100.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/aiff_stereo_24bit_44100.aif -------------------------------------------------------------------------------- /tests/test-audio/aiff_stereo_24bit_48000.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/aiff_stereo_24bit_48000.aif -------------------------------------------------------------------------------- /tests/test-audio/aiff_stereo_32bit_44100.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/aiff_stereo_32bit_44100.aif -------------------------------------------------------------------------------- /tests/test-audio/aiff_stereo_32bit_48000.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/aiff_stereo_32bit_48000.aif -------------------------------------------------------------------------------- /tests/test-audio/aiff_stereo_8bit_44100.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/aiff_stereo_8bit_44100.aif -------------------------------------------------------------------------------- /tests/test-audio/aiff_stereo_8bit_48000.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/aiff_stereo_8bit_48000.aif -------------------------------------------------------------------------------- /tests/test-audio/wav_8chan_24bit_48000.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/wav_8chan_24bit_48000.wav -------------------------------------------------------------------------------- /tests/test-audio/wav_mono_16bit_44100.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/wav_mono_16bit_44100.wav -------------------------------------------------------------------------------- /tests/test-audio/wav_mono_16bit_48000.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/wav_mono_16bit_48000.wav -------------------------------------------------------------------------------- /tests/test-audio/wav_stereo_16bit_44100.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/wav_stereo_16bit_44100.wav -------------------------------------------------------------------------------- /tests/test-audio/wav_stereo_16bit_48000.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/wav_stereo_16bit_48000.wav -------------------------------------------------------------------------------- /tests/test-audio/wav_stereo_24bit_44100.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/wav_stereo_24bit_44100.wav -------------------------------------------------------------------------------- /tests/test-audio/wav_stereo_24bit_48000.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/wav_stereo_24bit_48000.wav -------------------------------------------------------------------------------- /tests/test-audio/wav_stereo_32bit_44100.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/wav_stereo_32bit_44100.wav -------------------------------------------------------------------------------- /tests/test-audio/wav_stereo_32bit_48000.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/wav_stereo_32bit_48000.wav -------------------------------------------------------------------------------- /tests/test-audio/wav_stereo_8bit_44100.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/wav_stereo_8bit_44100.wav -------------------------------------------------------------------------------- /tests/test-audio/wav_stereo_8bit_48000.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/AudioFile/573abb95fe385785f46a5a660dbd1ae9f487ec9b/tests/test-audio/wav_stereo_8bit_48000.wav -------------------------------------------------------------------------------- /tests/test-headers/aiff_stereo_16bit_44100.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace aiff_stereo_16bit_44100 { 4 | 5 | int numSamplesPerChannel = 352800; 6 | int bitDepth = 16; 7 | uint32_t sampleRate = 44100; 8 | int numChannels = 2; 9 | 10 | std::vector> testBuffer = {{-0.009429931640625, -0.030426025390625, -0.035186767578125, 0.17071533203125, -0.01959228515625, -0.11553955078125, 0.06549072265625, 0.014617919921875, -0.01251220703125, -0.038818359375, -0.051116943359375, 0.055755615234375, 0.052215576171875, 0.010406494140625, -0.0538330078125, -0.038848876953125, 0.059295654296875, -0.002655029296875, -0.004608154296875, 0.062774658203125, 0.03363037109375, 0.040863037109375, -0.00921630859375, -0.055572509765625, -0.015533447265625, -0.070648193359375, -0.0711669921875, 0.0555419921875, 0.142486572265625, 0.044586181640625, -0.14093017578125, -0.04248046875, 0.116851806640625, 0.03070068359375, -0.069549560546875, -0.035400390625, 0.1212158203125, 0.07855224609375, -0.1387939453125, 0.037109375, 0.1822509765625, -0.1285400390625, -0.071685791015625, 0.22222900390625, -0.020782470703125, -0.175018310546875, 0.080718994140625, 0.116790771484375, -0.033233642578125, -0.00732421875, 0.068206787109375, -0.014404296875, -0.016632080078125, 0.1287841796875, 0.06170654296875, -0.033599853515625, 0.129180908203125, 0.152374267578125, -0.0736083984375, -0.08221435546875, 0.12152099609375, 0.10015869140625, -0.069122314453125, 0.015380859375, 0.158447265625, 0.025604248046875, -0.029754638671875, 0.1312255859375, 0.060211181640625, -0.105621337890625, 0.050079345703125, 0.21539306640625, 0.049591064453125, -0.066802978515625, 0.0919189453125, 0.013458251953125, -0.132843017578125, 0.152252197265625, 0.18670654296875, -0.079315185546875, 0.025909423828125, 0.1351318359375, -0.00177001953125, -0.04156494140625, 0.041412353515625, -0.02325439453125, -0.10821533203125, 0.065704345703125, 0.08941650390625, -0.067901611328125, -0.03741455078125, 0.01251220703125, 0.080474853515625, 0.03302001953125, -0.148468017578125, -0.019134521484375, 0.065338134765625, -0.136505126953125, -0.06561279296875, 0.09429931640625, -0.020660400390625, -0.0557861328125, -0.045623779296875, -0.090576171875, -0.060943603515625, -0.0792236328125, -0.01702880859375, -0.002716064453125, -0.141143798828125, -0.10955810546875, -0.034332275390625, -0.023284912109375, -0.035552978515625, -0.10833740234375, -0.103363037109375, -0.03570556640625, -0.0582275390625, -0.14263916015625, -0.167572021484375, -0.079315185546875, -0.044677734375, -0.1461181640625, -0.1444091796875, -0.075531005859375, -0.081146240234375, -0.104156494140625, -0.126373291015625, -0.11944580078125, -0.158905029296875, -0.167388916015625, -0.1009521484375, -0.134307861328125, -0.15655517578125, -0.098114013671875, -0.1104736328125, -0.15087890625, -0.125732421875, -0.140380859375, -0.166748046875, -0.076690673828125, -0.044403076171875, -0.152130126953125, -0.1761474609375, -0.0623779296875, -0.009002685546875, -0.083526611328125, -0.1474609375, -0.13336181640625, -0.087432861328125, -0.09112548828125, -0.1595458984375, -0.11383056640625, 0.0025634765625, -0.108612060546875, -0.176055908203125, -0.017364501953125, -0.05621337890625, -0.171630859375, -0.048736572265625, 0.077789306640625, -0.01885986328125, -0.144775390625, -0.062713623046875, -0.01025390625, -0.075836181640625, -0.057830810546875, -0.00714111328125, 0.016387939453125, -0.017364501953125, -0.015411376953125, 0.061767578125, 0.011260986328125, -0.0439453125, 0.026641845703125, 0.056884765625, 0.02276611328125, 0.0557861328125, 0.09747314453125, 0.022064208984375, -0.023834228515625, 0.037872314453125, 0.1395263671875, 0.0946044921875, -0.033355712890625, 0.10833740234375, 0.190093994140625, 0.0584716796875, 0.059173583984375, 0.08880615234375, 0.0999755859375, 0.104644775390625, 0.066558837890625, 0.089996337890625, 0.126220703125, 0.13580322265625, 0.150634765625, 0.122833251953125, 0.072235107421875, 0.10394287109375, 0.136077880859375, 0.124969482421875, 0.144622802734375, 0.116241455078125, 0.114501953125, 0.1761474609375, 0.139617919921875, 0.098052978515625, 0.158355712890625, 0.14996337890625, 0.053192138671875, 0.090240478515625, 0.182586669921875, 0.175506591796875, 0.16473388671875, 0.122100830078125, 0.103729248046875, 0.1373291015625, 0.112823486328125, 0.12225341796875, 0.138885498046875, 0.150299072265625, 0.15008544921875, 0.096405029296875, 0.090911865234375, 0.01837158203125, -0.038330078125, 0.025909423828125, 0.001434326171875, -0.01409912109375, 0.0623779296875, 0.112518310546875, 0.1634521484375, 0.24664306640625, 0.253265380859375, 0.236114501953125, 0.298248291015625, 0.243194580078125, 0.172027587890625, 0.24615478515625, 0.216766357421875, 0.134552001953125, 0.121490478515625, 0.11419677734375, 0.08935546875, -0.007232666015625, -0.0238037109375, 0.013458251953125, -0.071044921875, -0.09210205078125, -0.051483154296875, -0.08331298828125, -0.127166748046875, -0.137054443359375, -0.077239990234375, -0.053558349609375, -0.08843994140625, -0.098236083984375, -0.14013671875, -0.12054443359375, -0.044769287109375, -0.11083984375, -0.152679443359375, -0.06036376953125, -0.060333251953125, -0.1005859375, -0.07586669921875, -0.02154541015625, 0.022705078125, -0.02044677734375, 0.00494384765625, 0.069183349609375, 0.079742431640625, 0.158416748046875, 0.142669677734375, 0.080841064453125, 0.1121826171875, 0.0828857421875, 0.0223388671875, 0.018951416015625, 0.056610107421875, 0.060394287109375, 0.02294921875, 0.000701904296875, -0.020172119140625, 0.01123046875, 0.031005859375, -0.038848876953125, -0.03265380859375, 0.012420654296875, -0.050567626953125, -0.099517822265625, -0.07818603515625, -0.1011962890625, -0.1331787109375, -0.130584716796875, -0.16241455078125, -0.175506591796875, -0.164947509765625, -0.161773681640625, -0.11907958984375, -0.11871337890625, -0.174957275390625, -0.1658935546875, -0.157562255859375, -0.223480224609375, -0.22882080078125, -0.17333984375, -0.190582275390625, -0.24285888671875, -0.215728759765625, -0.159027099609375, -0.172882080078125, -0.198516845703125, -0.1790771484375, -0.162689208984375, -0.188690185546875, -0.21173095703125, -0.2039794921875, -0.207122802734375, -0.184112548828125, -0.162811279296875, -0.19024658203125, -0.1748046875, -0.14013671875, -0.142974853515625, -0.149322509765625, -0.1236572265625, -0.096710205078125, -0.12646484375, -0.130645751953125, -0.077789306640625, -0.04254150390625, -0.060028076171875, -0.049163818359375, 0.04315185546875, 0.0528564453125, 0.01708984375, 0.069427490234375, 0.1015625, 0.10479736328125, 0.1112060546875, 0.106781005859375, 0.168792724609375, 0.215240478515625, 0.1641845703125, 0.156829833984375, 0.200408935546875, 0.196014404296875, 0.158477783203125, 0.147491455078125, 0.1724853515625, 0.17608642578125, 0.156982421875, 0.14520263671875, 0.14154052734375, 0.143707275390625, 0.128875732421875, 0.083282470703125, 0.0904541015625, 0.121429443359375, 0.060333251953125, 0.068634033203125, 0.142333984375, 0.122314453125, 0.13726806640625, 0.163848876953125, 0.15008544921875, 0.189056396484375, 0.202056884765625, 0.1939697265625, 0.219818115234375, 0.23236083984375, 0.224822998046875, 0.198516845703125, 0.188720703125, 0.17999267578125, 0.14501953125, 0.146270751953125, 0.16339111328125, 0.17364501953125, 0.180633544921875, 0.133514404296875, 0.111175537109375, 0.1343994140625, 0.082366943359375, 0.022735595703125, 0.025115966796875, 0.013641357421875, -0.01580810546875, -0.011444091796875, 0.024688720703125, 0.019287109375, -0.020111083984375, 0.0008544921875, 0.008087158203125, -0.01922607421875, -0.004669189453125, -0.00848388671875, -0.012908935546875, -0.00213623046875, -0.00225830078125, 0.0054931640625, -0.001495361328125, 0.012298583984375, 0.026397705078125, 0.01165771484375, 0.00335693359375, -0.002105712890625, 0.020843505859375, 0.02276611328125, -0.02996826171875, -0.027313232421875, -0.02850341796875, -0.09857177734375, -0.08453369140625, -0.043792724609375, -0.0887451171875, -0.09521484375, -0.076507568359375, -0.087890625, -0.094085693359375, -0.102294921875, -0.08465576171875, -0.071258544921875, -0.1043701171875, -0.097869873046875, -0.063446044921875, -0.063201904296875, -0.03558349609375, 0.001495361328125, 0.003631591796875, -0.000579833984375, -0.004791259765625, 0.000457763671875, -0.00103759765625, -0.043792724609375, -0.079864501953125, -0.08441162109375, -0.106689453125, -0.130645751953125, -0.136871337890625, -0.120819091796875, -0.10394287109375, -0.12506103515625, -0.10198974609375, -0.04742431640625, -0.03851318359375, -0.018798828125, 6.103515625e-05, -0.0032958984375, 0.023895263671875, 0.047271728515625, 0.018463134765625, -0.0032958984375, 0.022735595703125, 0.024200439453125, -0.00927734375, -0.014892578125, -0.024810791015625, -0.04498291015625, -0.0562744140625, -0.072113037109375, -0.073638916015625, -0.06494140625, -0.065460205078125, -0.0618896484375, -0.03472900390625, -0.012542724609375, -0.0146484375, -0.0078125, -0.01214599609375, -0.021453857421875, -0.010986328125, -0.011749267578125, -0.0126953125, -0.0233154296875, -0.040374755859375, -0.025238037109375, -0.002838134765625, -0.007720947265625, -0.022674560546875, -0.01568603515625, -0.012481689453125, -0.013275146484375, -0.0062255859375, -0.022705078125, -0.026885986328125, -0.023712158203125, -0.051971435546875, -0.048828125, -0.0289306640625, -0.0340576171875, -0.02191162109375, 0.003936767578125, 0.027923583984375, 0.021881103515625, -0.00665283203125, 0.016693115234375, 0.052764892578125, 0.034271240234375}, {-0.007781982421875, -0.02508544921875, -0.029052734375, 0.140869140625, -0.01611328125, -0.095458984375, 0.05401611328125, 0.011932373046875, -0.010223388671875, -0.031890869140625, -0.0419921875, 0.046112060546875, 0.04302978515625, 0.00836181640625, -0.044525146484375, -0.03228759765625, 0.048736572265625, -0.002410888671875, -0.004119873046875, 0.051666259765625, 0.0269775390625, 0.03399658203125, -0.008331298828125, -0.047271728515625, -0.011627197265625, -0.06134033203125, -0.063690185546875, 0.050567626953125, 0.115875244140625, 0.02581787109375, -0.11456298828125, -0.02630615234375, 0.096099853515625, 0.013671875, -0.071929931640625, -0.02972412109375, 0.117401123046875, 0.074859619140625, -0.143341064453125, -0.00653076171875, 0.169342041015625, -0.070709228515625, -0.08624267578125, 0.13677978515625, -0.010528564453125, -0.12677001953125, 0.04742431640625, 0.08538818359375, -0.015228271484375, 0.002410888671875, 0.0445556640625, -0.052581787109375, -0.034423828125, 0.1241455078125, 0.05096435546875, -0.07647705078125, 0.03424072265625, 0.094482421875, -0.033660888671875, -0.049407958984375, 0.078582763671875, 0.05535888671875, -0.0574951171875, 0.020355224609375, 0.100433349609375, -0.02215576171875, -0.03228759765625, 0.10845947265625, 0.03070068359375, -0.09619140625, 0.029327392578125, 0.1314697265625, 0.0103759765625, -0.052734375, 0.0662841796875, -0.00958251953125, -0.125244140625, 0.113067626953125, 0.150970458984375, -0.065399169921875, 0.011138916015625, 0.093963623046875, -0.018157958984375, -0.045501708984375, 0.036041259765625, -0.0130615234375, -0.096466064453125, 0.043609619140625, 0.073486328125, -0.057037353515625, -0.042388916015625, 0.003509521484375, 0.0645751953125, 0.02593994140625, -0.10821533203125, 0.001708984375, 0.066436767578125, -0.089385986328125, -0.026611328125, 0.091949462890625, -0.017486572265625, -0.05657958984375, -0.030548095703125, -0.031036376953125, -0.0108642578125, -0.0548095703125, -0.008148193359375, 0.019012451171875, -0.07684326171875, -0.05609130859375, -0.020751953125, -0.01458740234375, 0.005767822265625, -0.030181884765625, -0.057037353515625, -0.031707763671875, -0.00396728515625, -0.04803466796875, -0.10845947265625, -0.04644775390625, 0.016204833984375, -0.0521240234375, -0.080047607421875, -0.04339599609375, -0.0306396484375, -0.0360107421875, -0.0577392578125, -0.05877685546875, -0.0797119140625, -0.0787353515625, -0.0491943359375, -0.08892822265625, -0.082855224609375, -0.01922607421875, -0.055511474609375, -0.105194091796875, -0.05084228515625, -0.041015625, -0.0833740234375, -0.031768798828125, -3.0517578125e-05, -0.070098876953125, -0.10113525390625, -0.031951904296875, 0.022705078125, -0.010101318359375, -0.069854736328125, -0.10662841796875, -0.069244384765625, -0.0113525390625, -0.0545654296875, -0.062530517578125, 9.1552734375e-05, -0.06982421875, -0.106781005859375, -0.003692626953125, -0.030242919921875, -0.09442138671875, -0.01922607421875, 0.04986572265625, -0.0126953125, -0.092254638671875, -0.043212890625, -0.018310546875, -0.0484619140625, -0.005340576171875, 0.0389404296875, 0.034820556640625, -0.01239013671875, -0.011444091796875, 0.030059814453125, -0.015228271484375, -0.02685546875, 0.0303955078125, 0.035308837890625, -9.1552734375e-05, 0.02789306640625, 0.07049560546875, 0.003448486328125, -0.044647216796875, 0.00933837890625, 0.09552001953125, 0.065460205078125, -0.0450439453125, 0.057403564453125, 0.13531494140625, 0.024139404296875, 0.014404296875, 0.050933837890625, 0.055084228515625, 0.049957275390625, 0.024383544921875, 0.033477783203125, 0.051483154296875, 0.06805419921875, 0.09503173828125, 0.069183349609375, 0.0150146484375, 0.038299560546875, 0.059478759765625, 0.040802001953125, 0.063751220703125, 0.052001953125, 0.0469970703125, 0.091278076171875, 0.067962646484375, 0.046661376953125, 0.09881591796875, 0.074493408203125, -0.013519287109375, 0.033447265625, 0.101318359375, 0.076904296875, 0.064727783203125, 0.0325927734375, 0.03033447265625, 0.058807373046875, 0.036102294921875, 0.055633544921875, 0.07525634765625, 0.086578369140625, 0.086090087890625, 0.030487060546875, 0.001800537109375, -0.07098388671875, -0.09820556640625, -0.02899169921875, -0.053558349609375, -0.077789306640625, -0.018096923828125, 0.046783447265625, 0.120819091796875, 0.1968994140625, 0.192718505859375, 0.170928955078125, 0.228240966796875, 0.202850341796875, 0.143218994140625, 0.1767578125, 0.150665283203125, 0.103668212890625, 0.10107421875, 0.077880859375, 0.03509521484375, -0.03912353515625, -0.04345703125, -0.021881103515625, -0.09051513671875, -0.1024169921875, -0.07733154296875, -0.10015869140625, -0.126373291015625, -0.14178466796875, -0.10406494140625, -0.07568359375, -0.080963134765625, -0.076080322265625, -0.126373291015625, -0.124786376953125, -0.042022705078125, -0.078765869140625, -0.12628173828125, -0.0654296875, -0.062591552734375, -0.0731201171875, -0.033416748046875, -0.00018310546875, 0.02777099609375, 0.016571044921875, 0.060546875, 0.111297607421875, 0.112274169921875, 0.176422119140625, 0.176513671875, 0.13916015625, 0.160980224609375, 0.129608154296875, 0.0814208984375, 0.0892333984375, 0.114410400390625, 0.1002197265625, 0.07806396484375, 0.06915283203125, 0.03765869140625, 0.05810546875, 0.080780029296875, 0.01995849609375, 0.030548095703125, 0.08331298828125, 0.03369140625, -0.018096923828125, -0.008941650390625, -0.024444580078125, -0.059051513671875, -0.074554443359375, -0.10260009765625, -0.1148681640625, -0.093902587890625, -0.074920654296875, -0.0550537109375, -0.07427978515625, -0.11358642578125, -0.087493896484375, -0.081695556640625, -0.148345947265625, -0.160308837890625, -0.12030029296875, -0.132568359375, -0.172576904296875, -0.15130615234375, -0.100616455078125, -0.11102294921875, -0.128936767578125, -0.117645263671875, -0.117340087890625, -0.144439697265625, -0.17120361328125, -0.152923583984375, -0.14068603515625, -0.141448974609375, -0.12872314453125, -0.139892578125, -0.135467529296875, -0.108489990234375, -0.11370849609375, -0.13201904296875, -0.106842041015625, -0.0736083984375, -0.090179443359375, -0.085784912109375, -0.05206298828125, -0.045013427734375, -0.0595703125, -0.033111572265625, 0.05096435546875, 0.062774658203125, 0.028411865234375, 0.062896728515625, 0.08935546875, 0.096221923828125, 0.111419677734375, 0.10797119140625, 0.145233154296875, 0.184722900390625, 0.146026611328125, 0.132080078125, 0.174285888671875, 0.173431396484375, 0.130035400390625, 0.120269775390625, 0.139892578125, 0.13922119140625, 0.12957763671875, 0.109100341796875, 0.085662841796875, 0.093994140625, 0.083526611328125, 0.0277099609375, 0.028350830078125, 0.05755615234375, 0.015045166015625, 0.02264404296875, 0.071044921875, 0.0557861328125, 0.076507568359375, 0.100250244140625, 0.089202880859375, 0.12200927734375, 0.132537841796875, 0.117462158203125, 0.143524169921875, 0.168243408203125, 0.15576171875, 0.125396728515625, 0.11529541015625, 0.103790283203125, 0.072662353515625, 0.0721435546875, 0.08599853515625, 0.1007080078125, 0.11004638671875, 0.0616455078125, 0.03515625, 0.051177978515625, 0.001678466796875, -0.04595947265625, -0.046478271484375, -0.07000732421875, -0.093109130859375, -0.069305419921875, -0.02935791015625, -0.047698974609375, -0.096771240234375, -0.073028564453125, -0.055206298828125, -0.081085205078125, -0.068878173828125, -0.06353759765625, -0.067138671875, -0.05389404296875, -0.050994873046875, -0.060028076171875, -0.06683349609375, -0.0323486328125, -0.00848388671875, -0.02935791015625, -0.045501708984375, -0.046112060546875, -0.01715087890625, -0.007598876953125, -0.057159423828125, -0.06317138671875, -0.057373046875, -0.1085205078125, -0.0994873046875, -0.0782470703125, -0.119537353515625, -0.111358642578125, -0.083343505859375, -0.09002685546875, -0.0958251953125, -0.100677490234375, -0.080657958984375, -0.0738525390625, -0.103668212890625, -0.087860107421875, -0.05670166015625, -0.052581787109375, -0.01361083984375, 0.02984619140625, 0.026763916015625, 0.01654052734375, 0.02197265625, 0.034820556640625, 0.028961181640625, -0.011688232421875, -0.040740966796875, -0.047515869140625, -0.07000732421875, -0.088226318359375, -0.089599609375, -0.073089599609375, -0.06304931640625, -0.074798583984375, -0.04254150390625, 0.005157470703125, 0.018096923828125, 0.040924072265625, 0.058380126953125, 0.05657958984375, 0.07958984375, 0.106414794921875, 0.0928955078125, 0.072479248046875, 0.0799560546875, 0.076019287109375, 0.055908203125, 0.0606689453125, 0.053497314453125, 0.023712158203125, 0.005218505859375, -0.0037841796875, 0.004302978515625, 0.01153564453125, -0.0072021484375, -0.00933837890625, 0.03509521484375, 0.071197509765625, 0.063995361328125, 0.056610107421875, 0.05157470703125, 0.048248291015625, 0.056488037109375, 0.053680419921875, 0.04522705078125, 0.035552978515625, 0.027679443359375, 0.0384521484375, 0.0545654296875, 0.04962158203125, 0.031768798828125, 0.03521728515625, 0.040618896484375, 0.0380859375, 0.039520263671875, 0.020111083984375, 0.015716552734375, 0.02117919921875, -0.010040283203125, -0.015045166015625, 0.006500244140625, 0.003692626953125, 0.008270263671875, 0.027801513671875, 0.053802490234375, 0.049957275390625, 0.017578125, 0.029022216796875, 0.06060791015625, 0.049957275390625}}; 11 | 12 | }; // end namespace -------------------------------------------------------------------------------- /tests/test-headers/aiff_stereo_16bit_48000.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace aiff_stereo_16bit_48000 { 4 | 5 | int numSamplesPerChannel = 384000; 6 | int bitDepth = 16; 7 | uint32_t sampleRate = 48000; 8 | int numChannels = 2; 9 | 10 | std::vector> testBuffer = {{0.0, 0.0, 0.0, -3.0517578125e-05, 3.0517578125e-05, 0.0, 6.103515625e-05, 3.0517578125e-05, 0.0, -0.00152587890625, -0.0037841796875, -0.00445556640625, -0.0029296875, -0.001953125, -0.0010986328125, -0.000885009765625, -0.0015869140625, -0.000946044921875, 0.003814697265625, 0.008880615234375, 0.008544921875, 0.001373291015625, -0.005218505859375, -0.00592041015625, -0.000213623046875, 0.00628662109375, 0.008331298828125, 0.00531005859375, 0.001983642578125, 0.002197265625, 0.003021240234375, 0.00146484375, -0.0003662109375, -0.00030517578125, 0.007354736328125, 0.03131103515625, 0.050201416015625, 0.024261474609375, -0.02618408203125, -0.039398193359375, -0.014251708984375, 0.013519287109375, 0.042083740234375, 0.047760009765625, 0.009521484375, -0.014190673828125, 0.01751708984375, 0.03814697265625, 0.003875732421875, -0.02069091796875, 0.01123046875, 0.033111572265625, 0.007598876953125, 0.017059326171875, 0.066558837890625, 0.0506591796875, -0.01678466796875, -0.029083251953125, 0.003204345703125, 0.021026611328125, 0.035736083984375, 0.031890869140625, -0.0257568359375, -0.0556640625, 0.02166748046875, 0.09393310546875, 0.028472900390625, -0.089630126953125, -0.092742919921875, 0.0054931640625, 0.05126953125, -0.007293701171875, -0.070465087890625, -0.0552978515625, -0.005584716796875, -0.0054931640625, -0.043060302734375, -0.0494384765625, -0.045166015625, -0.066802978515625, -0.064605712890625, -0.03546142578125, -0.05303955078125, -0.096771240234375, -0.084228515625, -0.040008544921875, -0.041046142578125, -0.07281494140625, -0.077484130859375, -0.059234619140625, -0.06219482421875, -0.095245361328125, -0.104644775390625, -0.0552978515625, -0.024322509765625, -0.07855224609375, -0.1416015625, -0.117156982421875, -0.034454345703125, -0.00921630859375, -0.08367919921875, -0.141326904296875, -0.083404541015625, 0.0086669921875, 0.001251220703125, -0.074493408203125, -0.067657470703125, 0.009857177734375, -0.01751708984375, -0.1160888671875, -0.08123779296875, 0.0286865234375, 0.023834228515625, -0.0228271484375, -0.007293701171875, 0.003143310546875, -0.000152587890625, 0.002685546875, -0.0128173828125, 0.0001220703125, 0.02496337890625, -0.021148681640625, -0.039947509765625, 0.075347900390625, 0.154296875, 0.061920166015625, -0.032379150390625, 0.009002685546875, 0.074676513671875, 0.06451416015625, 0.038665771484375, 0.058074951171875, 0.076263427734375, 0.065673828125, 0.084228515625, 0.135162353515625, 0.140472412109375, 0.0894775390625, 0.054443359375, 0.06353759765625, 0.0860595703125, 0.12384033203125, 0.16864013671875, 0.14739990234375, 0.08135986328125, 0.09307861328125, 0.180816650390625, 0.24127197265625, 0.236968994140625, 0.181243896484375, 0.09075927734375, -0.000946044921875, -0.029876708984375, 0.03076171875, 0.122344970703125, 0.17926025390625, 0.18585205078125, 0.160125732421875, 0.121917724609375, 0.0552978515625, -0.01513671875, -0.003875732421875, 0.07733154296875, 0.13287353515625, 0.147705078125, 0.14251708984375, 0.0924072265625, 0.01959228515625, -3.0517578125e-05, 0.03533935546875, 0.06378173828125, 0.046356201171875, 0.021026611328125, 0.031951904296875, 0.01239013671875, -0.05462646484375, -0.02325439453125, 0.11676025390625, 0.1571044921875, 0.03369140625, -0.083526611328125, -0.0931396484375, -0.066680908203125, -0.085052490234375, -0.139190673828125, -0.17095947265625, -0.177215576171875, -0.207550048828125, -0.24237060546875, -0.2021484375, -0.080078125, 0.01983642578125, 0.0133056640625, -0.048614501953125, -0.07525634765625, -0.087005615234375, -0.14178466796875, -0.204345703125, -0.2119140625, -0.197479248046875, -0.2066650390625, -0.204254150390625, -0.18341064453125, -0.188232421875, -0.202850341796875, -0.166717529296875, -0.083953857421875, -0.03448486328125, -0.04473876953125, -0.0679931640625, -0.09625244140625, -0.109344482421875, -0.0667724609375, -0.006591796875, 0.0330810546875, 0.07012939453125, 0.063201904296875, -0.051177978515625, -0.2208251953125, -0.326385498046875, -0.35015869140625, -0.35162353515625, -0.32568359375, -0.262115478515625, -0.17431640625, -0.044769287109375, 0.122344970703125, 0.2481689453125, 0.2684326171875, 0.23095703125, 0.192840576171875, 0.147796630859375, 0.086761474609375, -0.00384521484375, -0.10125732421875, -0.1444091796875, -0.115570068359375, -0.058258056640625, -0.027984619140625, -0.01055908203125, 0.035247802734375, 0.095001220703125, 0.13427734375, 0.1390380859375, 0.152313232421875, 0.21356201171875, 0.277099609375, 0.279327392578125, 0.2332763671875, 0.19677734375, 0.18988037109375, 0.194854736328125, 0.1807861328125, 0.122344970703125, 0.052947998046875, 0.0323486328125, 0.014739990234375, -0.04632568359375, -0.076080322265625, -0.0394287109375, 0.003662109375, 0.019012451171875, 0.02838134765625, 0.04583740234375, 0.03631591796875, 0.011016845703125, 0.036468505859375, 0.07733154296875, 0.0614013671875, 0.0079345703125, -0.026885986328125, -0.0228271484375, -0.001983642578125, 0.019775390625, 0.057769775390625, 0.118896484375, 0.183624267578125, 0.226104736328125, 0.2464599609375, 0.270172119140625, 0.2890625, 0.267822265625, 0.201263427734375, 0.125762939453125, 0.0765380859375, 0.061920166015625, 0.06439208984375, 0.047760009765625, -0.0068359375, -0.046234130859375, 0.006744384765625, 0.115814208984375, 0.1375732421875, 0.04473876953125, -0.046905517578125, -0.0953369140625, -0.133514404296875, -0.180084228515625, -0.230133056640625, -0.254058837890625, -0.22821044921875, -0.173309326171875, -0.12713623046875, -0.082305908203125, -0.025299072265625, 0.018310546875, 0.037567138671875, 0.04608154296875, 0.043060302734375, 0.035003662109375, 0.033203125, 0.031463623046875, 0.00933837890625, -0.0299072265625, -0.05133056640625, -0.073974609375, -0.150604248046875, -0.2430419921875, -0.273681640625, -0.258697509765625, -0.2574462890625, -0.261077880859375, -0.231964111328125, -0.210693359375, -0.235565185546875, -0.242828369140625, -0.20452880859375, -0.19964599609375, -0.26898193359375, -0.34588623046875, -0.3634033203125, -0.351837158203125, -0.35791015625, -0.36181640625, -0.343719482421875, -0.305908203125, -0.25054931640625, -0.17315673828125, -0.072357177734375, 0.0245361328125, 0.09521484375, 0.141510009765625, 0.169586181640625, 0.18475341796875, 0.19952392578125, 0.215972900390625, 0.2159423828125, 0.211090087890625, 0.228668212890625, 0.250823974609375, 0.273345947265625, 0.306732177734375, 0.324981689453125, 0.31182861328125, 0.29632568359375, 0.287841796875, 0.252685546875, 0.18682861328125, 0.127899169921875, 0.11199951171875, 0.1424560546875, 0.1658935546875, 0.153472900390625, 0.162506103515625, 0.196380615234375, 0.20623779296875, 0.2103271484375, 0.224578857421875, 0.21392822265625, 0.180084228515625, 0.1671142578125, 0.166046142578125, 0.116546630859375, 0.030670166015625, -0.012908935546875, -0.014678955078125, -0.022430419921875, -0.039886474609375, -0.054779052734375, -0.06024169921875, -0.048248291015625, -0.01617431640625, 0.010467529296875, 0.003692626953125, -0.023162841796875, -0.05780029296875, -0.098724365234375, -0.10809326171875, -0.082489013671875, -0.06134033203125, -0.059539794921875, -0.0728759765625, -0.07415771484375, -0.03515625, 0.0146484375, 0.01239013671875, -0.038665771484375, -0.060791015625, -0.03131103515625, -0.00250244140625, -0.005523681640625, -0.016998291015625, -0.006134033203125, 0.01934814453125, 0.047393798828125, 0.08221435546875, 0.108245849609375, 0.102020263671875, 0.062713623046875, 0.034210205078125, 0.030517578125, 0.0069580078125, -0.04296875, -0.071807861328125, -0.0491943359375, 0.002716064453125, 0.041107177734375, 0.05810546875, 0.053253173828125, 0.0350341796875, 0.026702880859375, 0.0201416015625, -0.000457763671875, -0.02337646484375, -0.0469970703125, -0.087738037109375, -0.12774658203125, -0.127105712890625, -0.10931396484375, -0.1192626953125, -0.102386474609375, -0.021026611328125, 0.038177490234375, 0.034942626953125, 0.031036376953125, 0.042083740234375, 0.037933349609375, 0.019622802734375, -0.0030517578125, -0.024627685546875, -0.02325439453125, 0.00146484375, 0.0152587890625, 0.02923583984375, 0.067779541015625, 0.090057373046875, 0.07781982421875, 0.068328857421875, 0.08221435546875, 0.10498046875, 0.10943603515625, 0.089996337890625, 0.08026123046875, 0.113372802734375, 0.150146484375, 0.138641357421875, 0.109222412109375, 0.107208251953125, 0.11798095703125, 0.114654541015625, 0.10211181640625, 0.09503173828125, 0.0758056640625, 0.060699462890625, 0.084564208984375, 0.10748291015625, 0.09002685546875, 0.0736083984375, 0.092193603515625, 0.107635498046875, 0.10784912109375, 0.127685546875, 0.14788818359375, 0.1387939453125, 0.136199951171875, 0.151611328125, 0.155364990234375, 0.152496337890625, 0.16754150390625, 0.181427001953125, 0.169586181640625, 0.162322998046875, 0.162109375, 0.136627197265625, 0.121673583984375, 0.149261474609375, 0.15789794921875, 0.12591552734375, 0.11029052734375, 0.125213623046875, 0.136444091796875, 0.143524169921875, 0.16168212890625, 0.158599853515625, 0.11553955078125, 0.07843017578125, 0.07415771484375, 0.076812744140625, 0.06414794921875, 0.03802490234375}, {0.0, 0.0, 3.0517578125e-05, -3.0517578125e-05, 9.1552734375e-05, -6.103515625e-05, 0.0001220703125, -9.1552734375e-05, 9.1552734375e-05, -0.00067138671875, -0.00177001953125, -0.001922607421875, -0.000244140625, 0.00042724609375, 0.000335693359375, -0.0008544921875, -0.00311279296875, -0.003173828125, 0.00146484375, 0.007049560546875, 0.006805419921875, 0.00018310546875, -0.005279541015625, -0.00360107421875, 0.00238037109375, 0.007568359375, 0.009368896484375, 0.00885009765625, 0.004302978515625, -0.003753662109375, -0.0096435546875, -0.0091552734375, -0.007537841796875, -0.002838134765625, 0.02001953125, 0.04461669921875, 0.027130126953125, -0.0228271484375, -0.0426025390625, -0.022735595703125, 0.00732421875, 0.03759765625, 0.042327880859375, 0.005645751953125, -0.015106201171875, 0.010162353515625, 0.019561767578125, -0.016204833984375, -0.03082275390625, 0.006805419921875, 0.02252197265625, -0.006744384765625, 0.010040283203125, 0.064483642578125, 0.044342041015625, -0.025238037109375, -0.034759521484375, -0.003662109375, 0.011505126953125, 0.02874755859375, 0.03045654296875, -0.0224609375, -0.046356201171875, 0.035888671875, 0.104156494140625, 0.02947998046875, -0.09515380859375, -0.095367431640625, 0.012847900390625, 0.06707763671875, 0.011199951171875, -0.05670166015625, -0.044921875, 0.008392333984375, 0.01495361328125, -0.01702880859375, -0.02484130859375, -0.025604248046875, -0.04046630859375, -0.023712158203125, 0.010284423828125, -0.01641845703125, -0.06744384765625, -0.050018310546875, -0.00732421875, -0.01861572265625, -0.050872802734375, -0.0430908203125, -0.012786865234375, -0.018585205078125, -0.0650634765625, -0.072021484375, -0.008087158203125, 0.0272216796875, -0.0291748046875, -0.091766357421875, -0.064300537109375, 0.0081787109375, 0.0091552734375, -0.073883056640625, -0.11468505859375, -0.036376953125, 0.053924560546875, 0.022674560546875, -0.069366455078125, -0.052764892578125, 0.0396728515625, 0.013153076171875, -0.08868408203125, -0.050689697265625, 0.050872802734375, 0.03717041015625, -0.002349853515625, 0.012451171875, 0.007598876953125, -0.006317138671875, -0.003814697265625, -0.01226806640625, 0.01177978515625, 0.02972412109375, -0.048614501953125, -0.08477783203125, 0.0445556640625, 0.14459228515625, 0.06085205078125, -0.046783447265625, -0.031463623046875, 0.02081298828125, 0.019439697265625, 0.011688232421875, 0.029022216796875, 0.027679443359375, -0.001007080078125, 0.005645751953125, 0.06414794921875, 0.101287841796875, 0.07928466796875, 0.03118896484375, -0.015411376953125, -0.02813720703125, 0.03118896484375, 0.11285400390625, 0.10699462890625, 0.024261474609375, -0.0008544921875, 0.059326171875, 0.1170654296875, 0.14697265625, 0.155426025390625, 0.108612060546875, 0.001495361328125, -0.083892822265625, -0.067413330078125, 0.01776123046875, 0.080780029296875, 0.1019287109375, 0.11871337890625, 0.129180908203125, 0.06622314453125, -0.0565185546875, -0.1072998046875, -0.05718994140625, 0.006439208984375, 0.0701904296875, 0.132110595703125, 0.135711669921875, 0.082366943359375, 0.02880859375, 0.011444091796875, 0.01629638671875, 0.00823974609375, 0.005523681640625, 0.0299072265625, 0.007049560546875, -0.070068359375, -0.05126953125, 0.082977294921875, 0.142974853515625, 0.072174072265625, 0.006866455078125, 0.0137939453125, 0.02203369140625, -0.02984619140625, -0.108062744140625, -0.136810302734375, -0.118927001953125, -0.14764404296875, -0.22454833984375, -0.220672607421875, -0.099395751953125, 0.029510498046875, 0.065032958984375, 0.04144287109375, 0.05908203125, 0.063323974609375, -0.040008544921875, -0.147735595703125, -0.149566650390625, -0.1265869140625, -0.153472900390625, -0.165008544921875, -0.120819091796875, -0.08428955078125, -0.09326171875, -0.099212646484375, -0.058990478515625, 0.0008544921875, 0.034088134765625, 0.015411376953125, -0.031585693359375, -0.03765869140625, -0.015228271484375, -0.00286865234375, 0.062652587890625, 0.17291259765625, 0.189056396484375, 0.09130859375, -0.0301513671875, -0.146331787109375, -0.25439453125, -0.323944091796875, -0.33447265625, -0.308319091796875, -0.263671875, -0.15850830078125, 0.02984619140625, 0.217437744140625, 0.297698974609375, 0.288055419921875, 0.264404296875, 0.235321044921875, 0.1824951171875, 0.07476806640625, -0.06707763671875, -0.144195556640625, -0.132904052734375, -0.10296630859375, -0.088287353515625, -0.067138671875, -0.02252197265625, 0.037017822265625, 0.08343505859375, 0.084869384765625, 0.080352783203125, 0.138031005859375, 0.215118408203125, 0.22509765625, 0.194854736328125, 0.18841552734375, 0.192596435546875, 0.1832275390625, 0.152130126953125, 0.090301513671875, 0.026702880859375, 0.003448486328125, -0.022857666015625, -0.100189208984375, -0.153717041015625, -0.127227783203125, -0.093902587890625, -0.100860595703125, -0.1019287109375, -0.073089599609375, -0.06304931640625, -0.07562255859375, -0.0333251953125, 0.040313720703125, 0.03509521484375, -0.04083251953125, -0.087646484375, -0.08642578125, -0.0819091796875, -0.078399658203125, -0.0452880859375, 0.020233154296875, 0.0819091796875, 0.13067626953125, 0.180419921875, 0.225067138671875, 0.250091552734375, 0.242218017578125, 0.2037353515625, 0.15057373046875, 0.1014404296875, 0.082183837890625, 0.092864990234375, 0.080718994140625, 0.014739990234375, -0.040496826171875, 0.01348876953125, 0.126708984375, 0.137908935546875, 0.0333251953125, -0.056396484375, -0.09442138671875, -0.132598876953125, -0.178192138671875, -0.216033935546875, -0.231109619140625, -0.199737548828125, -0.14239501953125, -0.092559814453125, -0.037109375, 0.025787353515625, 0.0687255859375, 0.089813232421875, 0.106109619140625, 0.107208251953125, 0.09088134765625, 0.0889892578125, 0.103607177734375, 0.09326171875, 0.05572509765625, 0.03228759765625, 0.02459716796875, -0.031585693359375, -0.1376953125, -0.195892333984375, -0.191925048828125, -0.204864501953125, -0.2216796875, -0.19268798828125, -0.16595458984375, -0.179595947265625, -0.178253173828125, -0.133453369140625, -0.121246337890625, -0.193023681640625, -0.277191162109375, -0.302947998046875, -0.302337646484375, -0.3109130859375, -0.3212890625, -0.3203125, -0.298675537109375, -0.26806640625, -0.223907470703125, -0.1361083984375, -0.03192138671875, 0.059326171875, 0.1324462890625, 0.174652099609375, 0.205780029296875, 0.236663818359375, 0.243499755859375, 0.224945068359375, 0.218841552734375, 0.238616943359375, 0.2457275390625, 0.24761962890625, 0.278106689453125, 0.297271728515625, 0.2808837890625, 0.266754150390625, 0.26373291015625, 0.2393798828125, 0.181396484375, 0.11865234375, 0.0947265625, 0.11846923828125, 0.133819580078125, 0.113128662109375, 0.107025146484375, 0.130096435546875, 0.136260986328125, 0.129180908203125, 0.132232666015625, 0.120269775390625, 0.0999755859375, 0.10845947265625, 0.117919921875, 0.0711669921875, -0.012908935546875, -0.05902099609375, -0.0595703125, -0.07958984375, -0.126373291015625, -0.15728759765625, -0.1663818359375, -0.154449462890625, -0.1175537109375, -0.085662841796875, -0.089019775390625, -0.10626220703125, -0.120391845703125, -0.150604248046875, -0.1820068359375, -0.173614501953125, -0.1453857421875, -0.13580322265625, -0.150634765625, -0.15509033203125, -0.11114501953125, -0.054534912109375, -0.053497314453125, -0.0948486328125, -0.109375, -0.0792236328125, -0.0484619140625, -0.042633056640625, -0.0447998046875, -0.033660888671875, -0.009063720703125, 0.02740478515625, 0.075653076171875, 0.112945556640625, 0.10479736328125, 0.0648193359375, 0.048431396484375, 0.0660400390625, 0.057769775390625, 0.004791259765625, -0.03753662109375, -0.02740478515625, 0.0211181640625, 0.0697021484375, 0.0985107421875, 0.09600830078125, 0.06591796875, 0.0494384765625, 0.0621337890625, 0.059326171875, 0.035064697265625, 0.0185546875, -0.008026123046875, -0.05322265625, -0.07183837890625, -0.057342529296875, -0.054656982421875, -0.04119873046875, 0.02783203125, 0.088104248046875, 0.092437744140625, 0.104949951171875, 0.123748779296875, 0.097991943359375, 0.068817138671875, 0.067230224609375, 0.052337646484375, 0.022918701171875, 0.02813720703125, 0.076690673828125, 0.113677978515625, 0.113067626953125, 0.116241455078125, 0.135589599609375, 0.13128662109375, 0.113922119140625, 0.137237548828125, 0.16937255859375, 0.140228271484375, 0.094146728515625, 0.117706298828125, 0.1761474609375, 0.178375244140625, 0.14324951171875, 0.139068603515625, 0.150177001953125, 0.13043212890625, 0.100128173828125, 0.09393310546875, 0.0870361328125, 0.05010986328125, 0.0272216796875, 0.05023193359375, 0.07421875, 0.06732177734375, 0.06121826171875, 0.073760986328125, 0.083984375, 0.088104248046875, 0.09515380859375, 0.095855712890625, 0.090545654296875, 0.081298828125, 0.0677490234375, 0.0736083984375, 0.103057861328125, 0.115020751953125, 0.101776123046875, 0.100189208984375, 0.11822509765625, 0.10791015625, 0.0548095703125, 0.038787841796875, 0.07855224609375, 0.075225830078125, 0.020111083984375, 0.00909423828125, 0.0477294921875, 0.076263427734375, 0.08416748046875, 0.090301513671875, 0.078094482421875, 0.028839111328125, -0.02044677734375, -0.02392578125, 0.000244140625, 0.0009765625, -0.0380859375}}; 11 | 12 | }; // end namespace -------------------------------------------------------------------------------- /tests/test-headers/aiff_stereo_8bit_44100.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace aiff_stereo_8bit_44100 { 4 | 5 | int numSamplesPerChannel = 352800; 6 | int bitDepth = 8; 7 | uint32_t sampleRate = 44100; 8 | int numChannels = 2; 9 | 10 | std::vector> testBuffer = {{0.0, 0.0, 0.0, -0.0078125, 0.0078125, -0.0078125, 0.0078125, -0.0078125, 0.015625, -0.03125, 0.0078125, 0.0078125, 0.0, -0.03125, 0.03125, 0.015625, -0.0078125, -0.0078125, 0.0390625, -0.078125, 0.0078125, 0.0390625, 0.0234375, -0.0390625, 0.046875, 0.0, -0.0234375, 0.0, 0.0078125, 0.03125, -0.0234375, -0.0234375, 0.046875, 0.0390625, 0.0234375, 0.0, -0.0546875, -0.03125, 0.0625, 0.03125, 0.0703125, -0.0234375, 0.0390625, 0.015625, 0.0234375, -0.0546875, 0.0390625, 0.0390625, 0.0, 0.0859375, 0.0546875, 0.03125, 0.0234375, 0.03125, -0.0390625, 0.09375, 0.0625, -0.03125, -0.0078125, 0.109375, 0.140625, -0.03125, -0.0625, 0.0390625, 0.1015625, 0.0625, -0.0078125, -0.0390625, 0.046875, 0.109375, 0.0, 0.015625, 0.0, 0.015625, 0.0078125, 0.0078125, -0.078125, 0.03125, 0.0390625, -0.015625, -0.0234375, 0.0078125, -0.0078125, -0.03125, -0.03125, -0.0390625, -0.0234375, 0.015625, -0.125, -0.1484375, 0.0078125, 0.0546875, -0.1328125, -0.15625, 0.0, 0.0390625, -0.0625, -0.078125, -0.078125, -0.0078125, -0.1328125, -0.140625, -0.03125, 0.015625, -0.09375, -0.078125, -0.1171875, -0.1015625, -0.09375, -0.1328125, -0.0703125, -0.0546875, -0.1796875, -0.09375, -0.0078125, -0.078125, -0.203125, -0.0859375, -0.046875, -0.140625, -0.1796875, -0.0546875, -0.109375, -0.125, -0.109375, 0.03125, -0.1640625, -0.1796875, -0.09375, -0.09375, -0.046875, 0.0234375, -0.078125, -0.15625, -0.03125, 0.0625, 0.03125, 0.0390625, -0.0625, -0.1953125, -0.171875, -0.1015625, 0.0078125, 0.0703125, 0.0546875, 0.03125, 0.0, -0.15625, -0.0625, 0.0234375, 0.078125, 0.1171875, 0.1484375, 0.0, -0.015625, 0.0546875, 0.0859375, 0.0703125, 0.0625, 0.0703125, 0.0546875, 0.0078125, 0.1484375, 0.3046875, 0.28125, 0.015625, 0.015625, 0.09375, 0.078125, -0.0234375, 0.015625, 0.0234375, -0.0078125, -0.0234375, 0.0546875, 0.203125, 0.265625, 0.1796875, 0.140625, 0.2109375, 0.109375, -0.0078125, 0.0703125, 0.09375, 0.0234375, 0.03125, 0.109375, 0.015625, 0.0, 0.15625, 0.28125, 0.203125, 0.234375, 0.1171875, 0.1015625, 0.171875, 0.1796875, 0.265625, 0.359375, 0.1875, 0.0, -0.1328125, -0.2265625, -0.25, -0.203125, -0.1328125, -0.09375, 0.140625, 0.3125, 0.390625, 0.3046875, 0.3046875, 0.1484375, 0.140625, 0.0078125, -0.1328125, -0.125, -0.125, -0.09375, -0.1640625, -0.0625, 0.0078125, 0.03125, -0.015625, 0.03125, 0.0625, 0.25, 0.125, 0.0, 0.0625, 0.0078125, -0.0390625, -0.0546875, -0.0859375, -0.1953125, -0.2421875, -0.265625, -0.328125, -0.265625, -0.2265625, -0.1953125, -0.34375, -0.203125, -0.203125, -0.25, -0.203125, -0.125, -0.2109375, -0.3671875, -0.2734375, -0.2890625, -0.1484375, -0.15625, -0.03125, 0.0546875, 0.0390625, -0.0390625, 0.0703125, 0.1640625, 0.046875, -0.1015625, -0.1015625, 0.0078125, -0.0625, -0.078125, -0.1796875, -0.1015625, -0.046875, 0.015625, -0.015625, -0.046875, -0.0625, -0.1875, -0.1640625, -0.25, -0.3359375, -0.2578125, -0.1015625, -0.0546875, 0.03125, 0.09375, 0.15625, 0.1484375, 0.1796875, 0.09375, 0.140625, 0.1171875, 0.1953125, 0.1328125, 0.0625, 0.046875, -0.015625, -0.0625, -0.21875, -0.0390625, -0.0859375, -0.0703125, 0.0, 0.0, -0.0390625, 0.0, -0.015625, -0.2734375, -0.15625, -0.1171875, -0.1484375, -0.21875, -0.1484375, -0.1328125, -0.0625, 0.09375, 0.203125, 0.2421875, 0.2421875, 0.4296875, 0.375, 0.28125, 0.390625, 0.3984375, 0.34375, 0.375, 0.3671875, 0.4453125, 0.40625, 0.4375, 0.4296875, 0.359375, 0.3828125, 0.2109375, 0.1875, 0.1484375, 0.1484375, 0.21875, 0.1953125, 0.1875, 0.21875, 0.1796875, 0.203125, 0.21875, 0.171875, 0.1875, 0.046875, -0.0390625, 0.0234375, -0.0078125, -0.25, -0.09375, -0.09375, -0.2265625, -0.1640625, -0.03125, -0.078125, -0.09375, -0.1953125, -0.2109375, -0.2265625, -0.28125, -0.171875, -0.125, -0.125, -0.3046875, -0.1171875, -0.1015625, -0.125, -0.109375, -0.25, -0.1796875, -0.0078125, -0.0625, -0.1796875, -0.09375, -0.0078125, 0.0546875, -0.0546875, 0.0390625, 0.0078125, -0.0703125, 0.015625, -0.0390625, -0.140625, -0.15625, -0.0625, -0.0703125, 0.09375, 0.03125, 0.0234375, -0.015625, -0.015625, 0.0078125, 0.0, -0.09375, -0.2265625, -0.171875, -0.046875, -0.0390625, -0.1171875, -0.0390625, 0.1328125, -0.0390625, -0.0078125, 0.09375, 0.0625, 0.0546875, 0.0703125, -0.0859375, 0.03125, 0.03125, 0.0546875, 0.1328125, 0.1484375, 0.046875, 0.09375, 0.0703125, 0.2109375, 0.2109375, 0.1015625, 0.0, 0.15625, 0.15625, 0.1171875, 0.140625, 0.1171875, 0.1796875, 0.1328125, 0.0859375, 0.0625, 0.09375, 0.0546875, 0.015625, 0.046875, 0.125, 0.109375, 0.1171875, 0.1328125, 0.140625, 0.1328125, 0.125, 0.0546875, 0.09375, 0.234375, 0.1640625, 0.1328125, 0.2109375, 0.1328125, 0.0390625, 0.046875, 0.21875, 0.15625, 0.078125, 0.125, 0.109375, 0.15625, 0.125, 0.1875, 0.0703125, 0.109375, 0.09375, 0.0546875, 0.0546875, 0.0859375, -0.0234375, 0.15625, 0.1015625, 0.0, -0.0703125, 0.0078125, 0.125, 0.0625, 0.0859375, 0.0546875, 0.1640625, 0.140625, 0.171875, 0.015625, 0.0078125, 0.0546875, -0.0625, 0.03125, 0.1015625, -0.0234375, -0.1796875, 0.0078125, 0.0390625, -0.078125, -0.1796875, -0.0859375, -0.078125, 0.0859375, -0.015625, -0.265625, -0.0546875, 0.0, -0.1015625, -0.0625, -0.1171875, -0.28125, -0.2578125, -0.1484375, -0.1328125, -0.2265625}, {0.0, 0.0, 0.0078125, -0.015625, 0.015625, -0.0234375, 0.0234375, -0.03125, 0.0234375, -0.0234375, 0.0234375, -0.015625, 0.0078125, -0.015625, 0.015625, -0.0078125, 0.0, 0.0, 0.0078125, 0.0, -0.015625, 0.015625, -0.0078125, 0.015625, 0.0, 0.0234375, -0.015625, 0.0078125, -0.0234375, 0.0078125, -0.015625, 0.0078125, 0.0546875, 0.0078125, -0.0078125, -0.0625, 0.0078125, -0.0078125, 0.0703125, 0.015625, 0.0, -0.0078125, 0.03125, -0.0078125, -0.03125, 0.0078125, 0.03125, -0.0078125, 0.0390625, 0.0703125, 0.0390625, -0.0625, 0.0234375, -0.0078125, 0.0546875, 0.03125, 0.0078125, -0.046875, 0.0703125, 0.140625, -0.015625, -0.09375, -0.0546875, 0.1171875, 0.0390625, -0.0078125, -0.0390625, 0.0234375, 0.0625, -0.015625, 0.0390625, -0.0390625, 0.0234375, -0.015625, 0.0703125, -0.0546875, -0.03125, 0.015625, 0.0234375, -0.03125, -0.0234375, 0.0390625, -0.03125, -0.03125, -0.046875, 0.0625, -0.0078125, -0.046875, -0.078125, 0.0078125, 0.03125, -0.0859375, -0.09375, -0.0390625, 0.109375, -0.046875, -0.0546875, -0.015625, 0.046875, -0.09375, -0.0859375, 0.046875, -0.0078125, 0.0078125, -0.0390625, -0.0078125, -0.078125, -0.015625, -0.0625, 0.0, -0.078125, -0.140625, -0.015625, 0.0625, 0.015625, -0.140625, -0.0625, -0.0546875, -0.03125, -0.0859375, -0.0390625, -0.0625, -0.0859375, -0.03125, 0.0078125, 0.0234375, -0.09375, -0.1015625, -0.125, 0.0, 0.0234375, 0.0, -0.1015625, -0.0546875, 0.0390625, 0.0546875, 0.0859375, 0.015625, -0.0703125, -0.1953125, -0.09375, -0.015625, 0.046875, 0.0546875, 0.0703125, 0.0546875, -0.109375, -0.1484375, -0.109375, 0.0234375, 0.03125, 0.1640625, 0.1015625, 0.0546875, -0.015625, 0.046875, 0.0, 0.0234375, 0.046875, 0.0390625, -0.0625, 0.0078125, 0.1796875, 0.1875, 0.0859375, 0.046875, 0.09375, 0.0390625, -0.015625, -0.09375, -0.0234375, -0.109375, -0.1171875, -0.125, 0.0703125, 0.140625, 0.171875, 0.1328125, 0.203125, 0.1015625, -0.0234375, -0.0625, -0.015625, -0.0546875, -0.0390625, 0.0078125, 0.03125, 0.015625, 0.0078125, 0.1015625, 0.140625, 0.15625, 0.0859375, 0.09375, 0.0625, 0.125, 0.171875, 0.3125, 0.2578125, 0.109375, -0.0390625, -0.1640625, -0.265625, -0.3203125, -0.234375, -0.2265625, -0.0859375, 0.1328125, 0.3671875, 0.3359375, 0.34375, 0.28125, 0.2265625, 0.09375, -0.046875, -0.171875, -0.1328125, -0.1171875, -0.1171875, -0.1015625, -0.03125, 0.0390625, 0.046875, 0.0234375, 0.0625, 0.1640625, 0.203125, 0.1484375, 0.078125, 0.140625, 0.09375, 0.0546875, -0.046875, -0.0625, -0.125, -0.203125, -0.28125, -0.2265625, -0.2265625, -0.1875, -0.2265625, -0.2109375, -0.1953125, -0.171875, -0.1015625, -0.078125, -0.109375, -0.21875, -0.203125, -0.21875, -0.1875, -0.15625, -0.0234375, -0.015625, 0.109375, 0.1015625, 0.15625, 0.1484375, 0.1796875, 0.09375, -0.015625, 0.046875, 0.0234375, 0.0546875, -0.1015625, -0.0625, 0.03125, 0.1171875, 0.0234375, -0.09375, -0.1171875, -0.1640625, -0.1640625, -0.2421875, -0.21875, -0.2265625, -0.1328125, -0.0546875, 0.0234375, 0.1015625, 0.09375, 0.1953125, 0.140625, 0.171875, 0.1171875, 0.171875, 0.109375, 0.1484375, 0.1015625, 0.0703125, -0.0546875, -0.078125, -0.1171875, -0.1640625, -0.171875, -0.109375, -0.1171875, -0.0859375, -0.03125, -0.0546875, -0.0703125, -0.1796875, -0.2421875, -0.2421875, -0.203125, -0.2734375, -0.234375, -0.25, -0.1875, -0.15625, 0.0390625, 0.1171875, 0.1953125, 0.21875, 0.328125, 0.328125, 0.2890625, 0.3046875, 0.3125, 0.3203125, 0.3125, 0.34375, 0.359375, 0.328125, 0.3359375, 0.34375, 0.2734375, 0.28125, 0.1171875, 0.1328125, 0.125, 0.1328125, 0.109375, 0.1796875, 0.1328125, 0.140625, 0.1015625, 0.1484375, 0.0859375, 0.140625, 0.125, -0.0234375, -0.09375, -0.0703125, -0.0625, -0.1953125, -0.15625, -0.1953125, -0.2734375, -0.1953125, -0.0859375, -0.1171875, -0.1796875, -0.203125, -0.234375, -0.2421875, -0.234375, -0.1953125, -0.203125, -0.15625, -0.2421875, -0.1328125, -0.0859375, -0.1640625, -0.1484375, -0.171875, -0.1015625, -0.0703125, -0.0625, -0.078125, -0.015625, 0.0234375, 0.078125, 0.0625, 0.0390625, 0.015625, 0.0234375, 0.0546875, -0.0234375, -0.078125, -0.0703125, 0.0546875, 0.0546875, 0.1484375, 0.0078125, 0.0625, 0.0390625, 0.0859375, 0.0234375, 0.046875, -0.0703125, -0.1171875, -0.09375, -0.046875, -0.0078125, 0.0703125, 0.1015625, 0.109375, 0.046875, 0.1484375, 0.109375, 0.0625, 0.078125, 0.1171875, -0.0078125, 0.109375, 0.0859375, 0.140625, 0.15625, 0.1796875, 0.09375, 0.09375, 0.1875, 0.21875, 0.203125, 0.078125, 0.1484375, 0.171875, 0.171875, 0.140625, 0.1796875, 0.1171875, 0.1328125, 0.109375, 0.0703125, 0.078125, 0.03125, 0.046875, -0.015625, 0.0703125, 0.0859375, 0.1171875, 0.109375, 0.078125, 0.09375, 0.1171875, 0.0546875, 0.0, 0.046875, 0.203125, 0.09375, 0.046875, 0.1484375, 0.125, 0.0078125, -0.0078125, 0.109375, 0.0390625, -0.0234375, 0.03125, 0.0703125, 0.09375, 0.0703125, 0.140625, 0.0078125, -0.046875, -0.03125, 0.03125, -0.0703125, -0.0703125, -0.03125, 0.0859375, -0.0078125, -0.109375, -0.1484375, -0.0234375, 0.0078125, -0.0390625, -0.03125, 0.0859375, 0.046875, 0.0625, 0.1015625, 0.046875, -0.09375, -0.0625, -0.109375, -0.0234375, 0.0078125, -0.0703125, -0.1484375, -0.1328125, -0.0546875, -0.1328125, -0.171875, -0.1328125, -0.0078125, -0.0234375, -0.046875, -0.1953125, -0.078125, -0.1328125, -0.1484375, -0.1171875, -0.140625, -0.234375, -0.2265625, -0.1640625, -0.0859375, -0.15625}}; 11 | 12 | }; // end namespace -------------------------------------------------------------------------------- /tests/test-headers/aiff_stereo_8bit_48000.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace aiff_stereo_8bit_48000 { 4 | 5 | int numSamplesPerChannel = 384000; 6 | int bitDepth = 8; 7 | uint32_t sampleRate = 48000; 8 | int numChannels = 2; 9 | 10 | std::vector> testBuffer = {{-0.0078125, 0.0234375, -0.1015625, -0.0703125, -0.0234375, -0.0703125, 0.0625, 0.109375, 0.1015625, -0.0546875, -0.0078125, 0.046875, 0.015625, 0.0234375, 0.0625, -0.109375, -0.0625, 0.046875, -0.0390625, -0.1796875, -0.1015625, -0.046875, 0.2265625, 0.2421875, 0.1171875, -0.1484375, -0.1953125, -0.1015625, 0.015625, 0.1484375, 0.09375, 0.0859375, 0.0625, -0.0390625, -0.140625, -0.0859375, 0.0234375, -0.1328125, -0.0390625, 0.1171875, 0.1171875, 0.0546875, 0.09375, -0.03125, 0.0390625, 0.046875, 0.1015625, 0.0703125, -0.0078125, 0.015625, 0.015625, -0.0390625, -0.109375, -0.125, -0.1484375, 0.078125, 0.078125, 0.0859375, 0.046875, 0.03125, 0.0859375, -0.015625, -0.015625, -0.1171875, -0.0703125, 0.0546875, 0.0703125, 0.234375, 0.234375, 0.1015625, 0.0546875, 0.1171875, 0.109375, 0.03125, -0.0546875, -0.015625, -0.09375, -0.015625, -0.0234375, -0.0078125, -0.1015625, -0.1796875, -0.109375, -0.1171875, -0.1328125, -0.140625, -0.1484375, -0.0703125, -0.0234375, 0.0234375, -0.046875, -0.078125, 0.0078125, 0.03125, -0.1171875, -0.15625, 0.046875, 0.1328125, 0.03125, 0.109375, 0.03125, 0.09375, 0.0234375, -0.0546875, 0.109375, 0.125, -0.0703125, -0.0234375, -0.09375, -0.1484375, -0.03125, 0.0078125, 0.03125, -0.0625, -0.3671875, -0.34375, -0.3125, -0.3203125, -0.2890625, -0.2421875, -0.15625, -0.1328125, -0.203125, -0.1015625, -0.3046875, -0.328125, -0.21875, -0.03125, -0.109375, -0.265625, -0.265625, -0.0625, 0.0546875, 0.0234375, 0.1328125, 0.0390625, -0.09375, 0.1015625, 0.0078125, -0.0078125, 0.1015625, 0.046875, 0.2265625, 0.2109375, 0.1015625, 0.1484375, 0.09375, 0.046875, 0.2421875, 0.15625, 0.0234375, 0.0625, 0.171875, 0.15625, 0.2265625, 0.1328125, 0.0234375, -0.03125, -0.0390625, -0.0390625, -0.046875, -0.09375, -0.046875, 0.046875, 0.0390625, -0.1015625, 0.015625, 0.0390625, 0.0234375, 0.0234375, 0.1015625, 0.0390625, -0.1015625, -0.171875, -0.203125, -0.0703125, 0.1015625, 0.0234375, -0.0078125, 0.015625, 0.0625, 0.1796875, 0.1015625, 0.140625, 0.046875, 0.046875, 0.2734375, 0.0390625, 0.0625, 0.1875, 0.203125, 0.0546875, 0.09375, 0.2890625, 0.203125, 0.0859375, 0.21875, 0.2734375, 0.3125, 0.1875, 0.203125, 0.265625, 0.2109375, 0.296875, 0.2265625, 0.140625, 0.2734375, 0.2421875, 0.1640625, 0.3203125, 0.0703125, 0.125, 0.1328125, 0.171875, 0.265625, 0.171875, 0.2109375, 0.078125, 0.0078125, 0.0703125, -0.0546875, 0.0, 0.1796875, -0.03125, -0.09375, -0.1796875, 0.0, 0.0, -0.1640625, -0.1640625, -0.1640625, -0.03125, -0.09375, -0.171875, -0.1875, -0.3359375, -0.2109375, -0.1640625, -0.1953125, -0.265625, -0.265625, -0.234375, -0.1796875, -0.2109375, -0.1640625, -0.2109375, -0.1640625, -0.2421875, -0.3125, -0.1875, -0.3203125, -0.234375, -0.1796875, -0.1640625, -0.3203125, -0.1796875, 0.0, -0.078125, -0.078125, -0.046875, -0.21875, -0.28125, -0.140625, -0.0546875, 0.0390625, -0.1171875, -0.078125, -0.0859375, 0.0234375, 0.0234375, -0.109375, 0.0078125, -0.0078125, -0.078125, 0.03125, 0.109375, 0.0234375, 0.0234375, 0.0859375, 0.1484375, 0.03125, 0.0078125, 0.0703125, 0.125, -0.109375, 0.0, 0.09375, 0.0546875, 0.03125, 0.0078125, 0.1015625, 0.046875, 0.0546875, 0.0390625, 0.1328125, 0.1328125, 0.1328125, 0.0, -0.015625, -0.1015625, -0.0546875, 0.0625, -0.0859375, 0.0234375, -0.0546875, 0.015625, 0.1640625, 0.1484375, 0.046875, 0.1015625, 0.03125, -0.125, -0.0859375, -0.046875, 0.015625, 0.0234375, 0.1171875, 0.171875, 0.09375, -0.078125, -0.0703125, 0.0625, 0.09375, -0.046875, -0.0859375, 0.078125, 0.1796875, 0.1015625, 0.0234375, 0.015625, 0.1015625, 0.2578125, 0.1171875, 0.0234375, -0.015625, 0.0078125, 0.1015625, 0.0703125, 0.1640625, 0.203125, 0.1484375, 0.1328125, 0.109375, 0.15625, 0.25, 0.0234375, 0.125, 0.2109375, 0.1171875, 0.1171875, 0.234375, 0.1796875, 0.09375, 0.0, 0.15625, 0.15625, 0.0703125, 0.25, 0.125, 0.1328125, 0.046875, 0.09375, 0.2109375, 0.1796875, 0.0546875, 0.03125, 0.1171875, 0.2421875, 0.1484375, -0.0390625, -0.015625, 0.0234375, 0.09375, -0.0234375, 0.09375, 0.0703125, 0.015625, 0.0, -0.1171875, -0.078125, -0.0390625, 0.0390625, -0.125, -0.0546875, 0.0390625, 0.0078125, -0.140625, -0.203125, -0.1796875, -0.109375, -0.078125, -0.1484375, -0.2109375, -0.09375, -0.125, -0.1953125, -0.25, -0.2421875, -0.140625, -0.1640625, -0.1953125, -0.1796875, -0.3125, -0.203125, -0.2578125, -0.203125, -0.109375, -0.1484375, -0.2890625, -0.2265625, -0.2109375, -0.171875, -0.28125, -0.21875, -0.2421875, -0.28125, -0.1796875, -0.140625, -0.2265625, -0.1015625, -0.140625, -0.25, -0.34375, -0.234375, 0.0, -0.1328125, -0.0234375, 0.0, -0.0859375, -0.1171875, -0.171875, -0.0546875, -0.0546875, -0.109375, -0.03125, -0.1015625, -0.09375, -0.0703125, 0.046875, 0.1640625, 0.03125, 0.0625, -0.0078125, -0.015625, 0.171875, 0.046875, 0.03125, -0.046875, -0.0078125, 0.171875, 0.1875, 0.1953125, 0.046875, 0.21875, 0.234375, 0.15625, 0.125, 0.15625, 0.0859375, 0.2265625, 0.1875, 0.1796875, 0.1484375, 0.234375, 0.1796875, 0.1953125, 0.390625, 0.3203125, 0.234375, 0.1015625, 0.203125, 0.234375, 0.25, 0.1796875, 0.2265625, 0.265625, 0.2421875, 0.171875, 0.15625, 0.2109375, 0.1015625, 0.2578125, 0.2734375, 0.3203125, 0.2578125, 0.109375, 0.0625, 0.2109375, 0.203125, 0.1875, 0.1796875, 0.03125, 0.0859375, 0.125, 0.171875, 0.078125, 0.0234375, 0.1015625, 0.0703125, 0.0546875}, {-0.0078125, 0.0234375, -0.09375, -0.0703125, -0.0078125, -0.078125, 0.078125, 0.0859375, 0.109375, -0.0625, 0.0, 0.0390625, 0.0234375, 0.0390625, 0.0390625, -0.125, -0.03125, 0.0859375, -0.0859375, -0.171875, -0.125, 0.0, 0.1953125, 0.2734375, 0.0859375, -0.1484375, -0.21875, -0.0546875, 0.03125, 0.1484375, 0.0703125, 0.0390625, 0.0625, -0.0234375, -0.1015625, -0.109375, 0.0546875, -0.1328125, -0.046875, 0.078125, 0.0859375, 0.09375, 0.0078125, -0.0078125, 0.0703125, 0.03125, 0.0859375, 0.046875, 0.0, 0.0078125, 0.03125, -0.078125, -0.1171875, -0.1953125, -0.1015625, 0.0078125, 0.1171875, 0.0546875, 0.0546875, 0.0703125, 0.0390625, 0.0, -0.109375, -0.09375, -0.1015625, 0.0625, 0.09375, 0.1796875, 0.2421875, 0.1171875, 0.078125, 0.0625, 0.1640625, -0.0546875, 0.0546875, -0.03125, -0.078125, -0.0625, -0.0390625, -0.0078125, -0.1328125, -0.1640625, -0.140625, -0.1015625, -0.171875, -0.1796875, -0.1328125, -0.0703125, -0.078125, 0.046875, -0.0546875, -0.0546875, 0.0625, 0.0234375, 0.03125, -0.1484375, 0.1484375, 0.1796875, 0.0703125, 0.1328125, 0.109375, 0.1484375, 0.046875, 0.0234375, 0.171875, 0.203125, -0.0546875, 0.0078125, -0.0625, -0.0546875, -0.015625, 0.046875, 0.078125, -0.046875, -0.265625, -0.3359375, -0.2109375, -0.3046875, -0.203125, -0.1796875, -0.109375, -0.109375, -0.125, -0.09375, -0.2578125, -0.2890625, -0.1640625, 0.0, -0.0703125, -0.1640625, -0.2421875, 0.0, 0.078125, 0.0546875, 0.171875, 0.03125, -0.015625, 0.125, 0.0625, 0.0234375, 0.125, 0.0625, 0.21875, 0.2265625, 0.109375, 0.1640625, 0.109375, 0.09375, 0.2109375, 0.1953125, -0.046875, 0.1328125, 0.109375, 0.1640625, 0.1875, 0.1171875, 0.0078125, -0.0546875, -0.0859375, -0.0625, -0.1171875, -0.1015625, -0.1171875, 0.0078125, 0.0, -0.15625, -0.03125, -0.03125, -0.0234375, -0.03125, 0.0390625, -0.0390625, -0.15625, -0.2578125, -0.25, -0.1640625, 0.0625, -0.0859375, -0.0546875, -0.078125, -0.015625, 0.0859375, 0.015625, 0.0546875, -0.03125, -0.0234375, 0.1796875, -0.015625, -0.03125, 0.140625, 0.09375, 0.015625, -0.015625, 0.2421875, 0.1015625, 0.03125, 0.1328125, 0.2265625, 0.2265625, 0.140625, 0.140625, 0.21875, 0.1640625, 0.234375, 0.203125, 0.0625, 0.2734375, 0.1640625, 0.1796875, 0.25, 0.0859375, 0.0703125, 0.140625, 0.1328125, 0.265625, 0.1484375, 0.203125, 0.078125, -0.0078125, 0.09375, -0.078125, 0.0234375, 0.15625, 0.0, -0.1015625, -0.1484375, 0.0078125, 0.03125, -0.15625, -0.125, -0.1484375, 0.0078125, -0.0703125, -0.1328125, -0.1640625, -0.28125, -0.1953125, -0.1015625, -0.1875, -0.1796875, -0.2578125, -0.15625, -0.15625, -0.1484375, -0.109375, -0.1640625, -0.0859375, -0.2109375, -0.2265625, -0.171875, -0.2109375, -0.2265625, -0.0703125, -0.1484375, -0.21875, -0.1484375, 0.09375, -0.0390625, -0.015625, 0.03125, -0.1796875, -0.171875, -0.1328125, 0.0703125, 0.0390625, -0.015625, -0.0546875, -0.0078125, 0.0703125, 0.0703125, -0.0390625, 0.0390625, 0.078125, -0.0546875, 0.1171875, 0.125, 0.0859375, 0.0546875, 0.1328125, 0.1953125, 0.0546875, 0.0625, 0.0859375, 0.1640625, -0.0859375, 0.0234375, 0.1171875, 0.078125, 0.0390625, 0.0390625, 0.078125, 0.09375, 0.0078125, 0.09375, 0.0859375, 0.15625, 0.1015625, -0.0078125, -0.0234375, -0.1328125, -0.0390625, 0.0, -0.0703125, -0.0546875, -0.046875, -0.0625, 0.15625, 0.078125, 0.0234375, 0.03125, 0.0, -0.1875, -0.125, -0.1015625, -0.046875, -0.03125, 0.046875, 0.1171875, 0.015625, -0.1328125, -0.1484375, 0.0, 0.015625, -0.109375, -0.1640625, 0.0078125, 0.09375, 0.0390625, -0.0625, -0.0546875, 0.015625, 0.1953125, 0.03125, -0.03125, -0.109375, -0.0390625, 0.0, 0.0234375, 0.0703125, 0.140625, 0.078125, 0.0625, 0.046875, 0.09375, 0.1796875, -0.03125, 0.0625, 0.171875, 0.046875, 0.078125, 0.171875, 0.140625, 0.046875, -0.0390625, 0.1171875, 0.125, 0.0390625, 0.21875, 0.109375, 0.1015625, 0.0390625, 0.0546875, 0.21875, 0.1484375, 0.0625, 0.0078125, 0.125, 0.25, 0.1484375, -0.0234375, -0.015625, 0.0625, 0.09375, 0.015625, 0.109375, 0.109375, 0.0390625, 0.03125, -0.0703125, -0.046875, 0.0078125, 0.078125, -0.0859375, 0.0078125, 0.0703125, 0.0859375, -0.109375, -0.125, -0.1328125, -0.03125, -0.0234375, -0.078125, -0.1484375, -0.0234375, -0.0546875, -0.125, -0.1796875, -0.1640625, -0.078125, -0.0859375, -0.1328125, -0.109375, -0.2421875, -0.125, -0.1953125, -0.1328125, -0.046875, -0.078125, -0.2265625, -0.1640625, -0.140625, -0.125, -0.1875, -0.1953125, -0.140625, -0.265625, -0.09375, -0.109375, -0.15625, -0.0703125, -0.0859375, -0.2109375, -0.3046875, -0.1796875, 0.015625, -0.0703125, -0.0234375, 0.0546875, -0.0859375, -0.078125, -0.1640625, -0.0234375, -0.0546875, -0.09375, -0.03125, -0.09375, -0.09375, -0.0703125, 0.03125, 0.1640625, 0.0078125, 0.0625, -0.03125, -0.03125, 0.1484375, 0.0234375, 0.0, -0.0703125, -0.0390625, 0.1328125, 0.1640625, 0.1484375, 0.015625, 0.1640625, 0.1875, 0.1015625, 0.0703125, 0.09375, 0.03125, 0.1640625, 0.1328125, 0.1171875, 0.0859375, 0.171875, 0.1015625, 0.1484375, 0.296875, 0.28125, 0.125, 0.0859375, 0.0859375, 0.203125, 0.1484375, 0.140625, 0.140625, 0.203125, 0.171875, 0.09375, 0.1015625, 0.125, 0.0625, 0.15625, 0.2421875, 0.21875, 0.2265625, 0.015625, 0.03125, 0.1328125, 0.171875, 0.125, 0.140625, -0.0234375, 0.046875, 0.0703125, 0.1328125, 0.03125, -0.015625, 0.0703125, 0.0390625, 0.0234375}}; 11 | 12 | }; // end namespace -------------------------------------------------------------------------------- /tests/test-headers/wav_mono_16bit_44100.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace wav_mono_16bit_44100 { 4 | 5 | int numSamplesPerChannel = 352800; 6 | int bitDepth = 16; 7 | uint32_t sampleRate = 44100; 8 | int numChannels = 1; 9 | 10 | std::vector testBuffer = {-3.0517578125e-05, -0.0001220703125, -0.001251220703125, -0.002655029296875, -0.003082275390625, 0.00384521484375, 0.02276611328125, 0.032806396484375, 0.02392578125, -0.006927490234375, -0.044647216796875, -0.03363037109375, 0.013580322265625, 0.030853271484375, 0.017547607421875, 0.00823974609375, 0.004669189453125, -0.00555419921875, -0.0089111328125, -0.014495849609375, -0.01409912109375, -0.04644775390625, -0.087615966796875, -0.070159912109375, -0.066192626953125, -0.03851318359375, 0.079010009765625, -0.015350341796875, 0.08154296875, 0.04486083984375, 0.1390380859375, 0.130859375, 0.13897705078125, 0.170257568359375, 0.177337646484375, 0.200958251953125, 0.1513671875, 0.172027587890625, 0.06463623046875, 0.018524169921875, -0.0003662109375, -0.040283203125, 0.0504150390625, 0.1331787109375, -0.0211181640625, 0.0137939453125, -0.061004638671875, 0.03656005859375, 0.14935302734375, -0.0780029296875, -0.030181884765625, -0.13665771484375, 0.083526611328125, 0.14727783203125, 0.075286865234375, 0.043701171875, 0.04949951171875, 0.259674072265625, 0.239288330078125, 0.32977294921875, 0.241302490234375, 0.261627197265625, 0.145355224609375, 0.16058349609375, 0.23248291015625, 0.09307861328125, 0.117095947265625, 0.01812744140625, 0.08355712890625, 0.208099365234375, 0.23675537109375, 0.148284912109375, 0.197235107421875, 0.167083740234375, 0.1513671875, 0.0177001953125, -0.095672607421875, 0.00750732421875, -0.12213134765625, 0.01165771484375, 0.134368896484375, 0.1112060546875, 0.019775390625, 0.019287109375, 0.140533447265625, 0.315887451171875, 0.263671875, 0.111663818359375, 0.12506103515625, 0.083709716796875, 0.076751708984375, -0.1580810546875, -0.16351318359375, -0.114227294921875, -0.08740234375, 0.03411865234375, 0.100738525390625, 0.043792724609375, 0.1314697265625, 0.170318603515625, 0.1011962890625, 0.285430908203125, 0.0733642578125, 0.17108154296875, 0.169342041015625, 0.201751708984375, 0.209381103515625, -0.068695068359375, -0.00189208984375, -0.048553466796875, -0.002410888671875, -0.113494873046875, -0.08819580078125, -0.159271240234375, -0.11395263671875, -0.0447998046875, -0.076934814453125, 0.038970947265625, -0.08612060546875, -0.12738037109375, -0.132049560546875, -0.071685791015625, -0.06298828125, 0.072174072265625, 0.043243408203125, 0.007568359375, -0.112457275390625, -0.235748291015625, -0.246368408203125, -0.339935302734375, -0.268218994140625, -0.31976318359375, -0.125457763671875, -0.166229248046875, -0.169342041015625, -0.165557861328125, -0.165771484375, -0.108154296875, -0.197784423828125, -0.05487060546875, -0.187103271484375, -0.0615234375, -0.077484130859375, -0.140899658203125, -0.017364501953125, -0.040069580078125, 0.063690185546875, 0.06719970703125, 0.06475830078125, 0.032562255859375, 0.03277587890625, -0.020660400390625, -0.0535888671875, -0.097900390625, -0.1622314453125, -0.149749755859375, -0.14080810546875, -0.1466064453125, -0.172393798828125, -0.20135498046875, -0.15380859375, -0.077911376953125, -0.14532470703125, -0.114990234375, -0.110107421875, -0.087249755859375, -0.079376220703125, -0.099761962890625, -0.044403076171875, -0.052398681640625, -0.05029296875, -0.087615966796875, -0.118804931640625, -0.11163330078125, -0.091033935546875, -0.074859619140625, -0.058197021484375, -0.12762451171875, -0.08990478515625, -0.052398681640625, -0.050567626953125, -0.067047119140625, -0.115203857421875, -0.04034423828125, -0.054412841796875, 0.00579833984375, 0.04461669921875, 0.1109619140625, 0.163970947265625, 0.249969482421875, 0.233154296875, 0.126220703125, 0.254669189453125, 0.20391845703125, 0.18463134765625, 0.14215087890625, 0.053375244140625, 0.025787353515625, 0.011260986328125, -0.00982666015625, -0.040985107421875, -0.039093017578125, -0.04107666015625, 0.0111083984375, -0.042633056640625, 0.018280029296875, -0.01263427734375, -0.032440185546875, 0.087493896484375, 0.089385986328125, 0.0784912109375, 0.095489501953125, 0.125396728515625, 0.07867431640625, 0.109405517578125, 0.113433837890625, 0.100341796875, 0.098480224609375, 0.13330078125, 0.127777099609375, 0.0899658203125, 0.091033935546875, -0.0078125, 0.000946044921875, -0.027252197265625, -0.080718994140625, -0.082244873046875, -0.039581298828125, 0.011260986328125, -0.0389404296875, -0.069580078125, -0.035614013671875, 0.00152587890625, 0.039520263671875, 0.08514404296875, 0.023284912109375, 0.035247802734375, 0.055084228515625, 0.064361572265625, 0.10723876953125, 0.067230224609375, 0.121002197265625, 0.124298095703125, 0.124237060546875, 0.168914794921875, 0.125244140625, 0.145721435546875, 0.1474609375, 0.110626220703125, 0.08642578125, 0.05352783203125, 0.090911865234375, 0.1287841796875, 0.094451904296875, 0.071075439453125, 0.073577880859375, 0.036285400390625, 0.031402587890625, 0.025360107421875, 0.029571533203125, -0.00909423828125, -0.032989501953125, -0.02886962890625, -0.080413818359375, -0.02471923828125, -0.0498046875, -0.069122314453125, -0.06512451171875, -0.054931640625, -0.085296630859375, -0.101531982421875, -0.0321044921875, -0.068634033203125, -0.040435791015625, -0.1119384765625, -0.07354736328125, -0.0289306640625, -0.00732421875, -0.004608154296875, -0.037261962890625, 0.025726318359375, -0.076171875, -0.030426025390625, -0.03961181640625, 0.0057373046875, -0.006256103515625, -0.04412841796875, 0.003082275390625, -0.1204833984375, -0.090789794921875, -0.074981689453125, -0.063934326171875, -0.10467529296875, -0.133026123046875, -0.1632080078125, -0.13623046875, -0.151519775390625, -0.208465576171875, -0.132965087890625, -0.143890380859375, -0.152862548828125, -0.16778564453125, -0.08392333984375, -0.1307373046875, -0.16351318359375, -0.1253662109375, -0.1890869140625, -0.19110107421875, -0.175323486328125, -0.10791015625, -0.107330322265625, -0.127532958984375, -0.08636474609375, -0.115692138671875, -0.12982177734375, -0.10577392578125, -0.16046142578125, -0.080841064453125, -0.1798095703125, -0.21697998046875, -0.139892578125, -0.14263916015625, -0.10260009765625, -0.204376220703125, -0.10614013671875, -0.15338134765625, -0.106536865234375, -0.061859130859375, -0.020843505859375, 0.046478271484375, 0.009552001953125, 0.153717041015625, 0.0352783203125, 0.136566162109375, 0.116912841796875, 0.128326416015625, 0.154541015625, 0.01678466796875, 0.0965576171875, 0.057830810546875, 0.154266357421875, 0.115325927734375, 0.07916259765625, 0.126068115234375, 0.06011962890625, 0.051483154296875, 0.06878662109375, 0.047393798828125, 0.059906005859375, -0.018707275390625, -0.022064208984375, 0.0264892578125, -0.020355224609375, 0.04156494140625, -0.001739501953125, 0.0784912109375, 0.01312255859375, 0.0772705078125, 0.13177490234375, 0.009033203125, 0.064544677734375, -0.021148681640625, 0.04193115234375, 0.0037841796875, -0.0091552734375, 0.03631591796875, 0.061859130859375, 0.071258544921875, 0.010162353515625, 0.026885986328125, 0.042266845703125, 0.01922607421875, -0.022613525390625, 0.0460205078125, 0.031341552734375, 0.033538818359375, 0.014251708984375, 0.01312255859375, 0.010284423828125, 0.00469970703125, -0.01556396484375, 0.062286376953125, 0.085968017578125, 0.09210205078125, 0.201751708984375, 0.007476806640625, 0.08587646484375, 0.015777587890625, 0.0203857421875, 0.106353759765625, -0.019561767578125, 0.097381591796875, 0.09967041015625, 0.057342529296875, 0.000701904296875, 0.041290283203125, 0.02935791015625, 0.126434326171875, 0.05072021484375, 0.079559326171875, 0.16424560546875, 0.085968017578125, 0.180694580078125, 0.13385009765625, 0.1304931640625, 0.02130126953125, 0.134429931640625, 0.046234130859375, -0.004425048828125, 0.01910400390625, -0.038604736328125, 0.040802001953125, -0.093536376953125, -0.070404052734375, -0.09259033203125, -0.01220703125, -0.063751220703125, -0.0347900390625, 0.033111572265625, 0.01263427734375, 0.02178955078125, -0.035491943359375, 0.066558837890625, 0.004791259765625, 0.02777099609375, 0.014129638671875, -0.073516845703125, -0.098846435546875, -0.0360107421875, -0.0831298828125, -0.09454345703125, -0.12896728515625, -0.15985107421875, -0.059417724609375, -0.185394287109375, -0.12420654296875, -0.19830322265625, -0.125274658203125, -0.12945556640625, -0.2213134765625, -0.095977783203125, -0.159637451171875, -0.096466064453125, -0.13299560546875, -0.119171142578125, -0.088775634765625, -0.08599853515625, -0.1082763671875, -0.08697509765625, -0.0390625, -0.108489990234375, -0.06884765625, -0.076690673828125, -0.10101318359375, -0.116058349609375, -0.097747802734375, -0.0970458984375, -0.16552734375, -0.170654296875, -0.123992919921875, -0.179107666015625, -0.132415771484375, -0.12921142578125, -0.126708984375, -0.052337646484375, -0.12774658203125, -0.05712890625, -0.055755615234375, -0.043853759765625, -0.05029296875, -0.04345703125, -0.010162353515625, -0.05126953125, -0.0245361328125, -0.05657958984375, -0.01922607421875, -0.0189208984375, 0.00103759765625, 0.001068115234375, -0.010498046875, 0.02166748046875, 0.03521728515625, 0.021820068359375, -0.000579833984375, -0.051055908203125, -0.098114013671875, -0.046630859375, -0.090850830078125, -0.047882080078125, -0.052764892578125, -0.1024169921875, -0.06805419921875, -0.05572509765625, -0.0196533203125, 0.0538330078125, 0.051605224609375, -0.02459716796875, -0.003875732421875, -0.027984619140625, 0.0260009765625}; 11 | 12 | }; // end namespace -------------------------------------------------------------------------------- /tests/test-headers/wav_mono_16bit_48000.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace wav_mono_16bit_48000 { 4 | 5 | int numSamplesPerChannel = 384000; 6 | int bitDepth = 16; 7 | uint32_t sampleRate = 48000; 8 | int numChannels = 1; 9 | 10 | std::vector testBuffer = {0.0177001953125, 0.003509521484375, -0.01373291015625, 0.01617431640625, 0.0201416015625, -0.03125, -0.07720947265625, 0.00177001953125, 0.021759033203125, -0.09649658203125, -0.01483154296875, 0.02691650390625, -0.03948974609375, -0.021728515625, -0.11358642578125, -0.109344482421875, -0.012664794921875, 0.000244140625, -0.035552978515625, -0.044647216796875, 0.0345458984375, -0.050140380859375, -0.052947998046875, 0.04705810546875, 0.06439208984375, 0.20098876953125, 0.1834716796875, 0.118438720703125, 0.127838134765625, 0.078704833984375, 0.0621337890625, 0.064178466796875, 0.1717529296875, 0.16400146484375, 0.032257080078125, -0.095550537109375, -0.201629638671875, -0.08441162109375, -0.009063720703125, -0.030792236328125, -0.04974365234375, -0.107269287109375, -0.1378173828125, -0.22943115234375, -0.220977783203125, -0.056884765625, 0.090606689453125, 0.14532470703125, 0.176605224609375, 0.151885986328125, -0.004058837890625, 0.02093505859375, 0.098541259765625, 0.046630859375, 0.0382080078125, 0.068389892578125, 0.165924072265625, 0.112762451171875, 0.13385009765625, 0.354095458984375, 0.310577392578125, 0.154510498046875, -0.049560546875, -0.14569091796875, -0.0330810546875, -0.027008056640625, 0.02398681640625, 0.038421630859375, 0.0145263671875, 0.072357177734375, 0.01226806640625, -0.04656982421875, -0.083831787109375, -0.100921630859375, -0.037078857421875, -0.013153076171875, -0.09112548828125, -0.115753173828125, 0.033416748046875, 0.091033935546875, 0.021514892578125, -0.07977294921875, -0.193359375, -0.134796142578125, -0.052398681640625, -0.096649169921875, -0.150726318359375, -0.145751953125, -0.034820556640625, 0.01708984375, -0.11181640625, -0.23297119140625, -0.234130859375, -0.10552978515625, -0.006805419921875, -0.058502197265625, -0.151763916015625, -0.157928466796875, 0.041595458984375, 0.064300537109375, -0.1041259765625, 0.07110595703125, 0.2601318359375, 0.109344482421875, -0.192413330078125, -0.324188232421875, -0.21563720703125, -0.094482421875, -0.000701904296875, -0.032012939453125, -0.01324462890625, 0.015472412109375, -0.1949462890625, -0.19189453125, -0.01409912109375, 0.091461181640625, 0.147796630859375, 0.100982666015625, 0.214202880859375, 0.206634521484375, -0.046356201171875, -0.13409423828125, -0.12939453125, -0.06060791015625, -0.05914306640625, -0.022369384765625, 0.16217041015625, 0.09503173828125, -0.009918212890625, 0.02069091796875, 0.139862060546875, 0.32208251953125, 0.30682373046875, 0.13201904296875, -0.1802978515625, -0.2109375, 0.2222900390625, 0.429168701171875, 0.340484619140625, 0.22589111328125, 0.08831787109375, -0.016448974609375, -0.06585693359375, -0.123382568359375, -0.15350341796875, 0.03057861328125, 0.248626708984375, 0.25494384765625, 0.2288818359375, 0.209930419921875, 0.033203125, -0.201904296875, -0.179534912109375, 0.0074462890625, 0.081817626953125, 0.155242919921875, 0.162811279296875, 0.08917236328125, 0.02777099609375, -0.054046630859375, 0.027740478515625, 0.048431396484375, -0.06085205078125, 0.002166748046875, 0.033782958984375, -0.0426025390625, -0.125335693359375, -0.0592041015625, 0.14520263671875, 0.062835693359375, -0.087738037109375, 0.0467529296875, 0.18975830078125, 0.304962158203125, 0.2059326171875, -0.258514404296875, -0.469390869140625, -0.3907470703125, -0.424407958984375, -0.448394775390625, -0.29132080078125, -0.07977294921875, 0.06341552734375, 0.1956787109375, 0.1392822265625, 0.054229736328125, 0.05419921875, -0.101531982421875, -0.180206298828125, -0.301300048828125, -0.444488525390625, -0.3128662109375, -0.1505126953125, -0.0086669921875, 0.10284423828125, 0.007293701171875, -0.270599365234375, -0.329437255859375, -0.1015625, 0.014739990234375, 0.1168212890625, 0.183380126953125, -0.06170654296875, -0.392120361328125, -0.29052734375, 0.177032470703125, 0.442352294921875, 0.494171142578125, 0.221710205078125, -0.4381103515625, -0.811370849609375, -0.74688720703125, -0.5858154296875, -0.41314697265625, -0.187713623046875, -0.120635986328125, -0.321563720703125, -0.226409912109375, 0.222442626953125, 0.48468017578125, 0.592803955078125, 0.578094482421875, 0.206817626953125, -0.21771240234375, -0.277130126953125, -0.157623291015625, -0.12664794921875, -0.15045166015625, -0.1463623046875, -0.149810791015625, -0.12579345703125, 0.004791259765625, 0.157470703125, 0.27960205078125, 0.3077392578125, 0.22271728515625, 0.21905517578125, 0.341583251953125, 0.361053466796875, 0.287689208984375, 0.298126220703125, 0.329925537109375, 0.331024169921875, 0.235626220703125, 0.114227294921875, 0.17572021484375, 0.170989990234375, -0.060577392578125, -0.2164306640625, -0.295440673828125, -0.233551025390625, 0.1085205078125, 0.2120361328125, 0.00384521484375, -0.070343017578125, -0.096221923828125, -0.103759765625, 0.0655517578125, 0.18218994140625, 0.03778076171875, -0.053924560546875, -0.116119384765625, -0.258453369140625, -0.034820556640625, 0.249664306640625, 0.247955322265625, 0.33013916015625, 0.4422607421875, 0.442291259765625, 0.407135009765625, 0.386993408203125, 0.45220947265625, 0.527740478515625, 0.545745849609375, 0.428497314453125, 0.128662109375, -0.055877685546875, -0.028594970703125, -0.0426025390625, -0.076141357421875, -0.02142333984375, 0.050384521484375, 0.05133056640625, -0.001495361328125, -0.032684326171875, -0.05157470703125, -0.084686279296875, -0.091339111328125, -0.205780029296875, -0.436737060546875, -0.518096923828125, -0.445220947265625, -0.262725830078125, -0.109161376953125, -0.013702392578125, 0.119354248046875, -0.044769287109375, -0.169158935546875, 0.030426025390625, 0.128173828125, 0.2552490234375, 0.337310791015625, 0.29351806640625, 0.191925048828125, -0.023223876953125, 0.017791748046875, 0.079498291015625, -0.211181640625, -0.438568115234375, -0.518524169921875, -0.664703369140625, -0.551300048828125, -0.142242431640625, -0.050689697265625, -0.283935546875, -0.484405517578125, -0.529541015625, -0.469970703125, -0.37457275390625, -0.168609619140625, -0.264984130859375, -0.591033935546875, -0.62158203125, -0.727752685546875, -0.85272216796875, -0.608245849609375, -0.332000732421875, -0.2779541015625, -0.322967529296875, -0.325592041015625, -0.243927001953125, -0.014495849609375, 0.252777099609375, 0.35235595703125, 0.355499267578125, 0.442352294921875, 0.51495361328125, 0.32513427734375, 0.11834716796875, 0.128387451171875, 0.227996826171875, 0.365753173828125, 0.34832763671875, 0.265380859375, 0.377716064453125, 0.579803466796875, 0.680389404296875, 0.633392333984375, 0.482757568359375, 0.143218994140625, -0.0994873046875, -0.1571044921875, -0.160400390625, 0.14752197265625, 0.328399658203125, 0.34173583984375, 0.50335693359375, 0.517486572265625, 0.29034423828125, -0.11956787109375, -0.08306884765625, 0.224365234375, 0.1968994140625, 0.1746826171875, 0.032440185546875, -0.0792236328125, -0.121307373046875, -0.250396728515625, -0.2518310546875, -0.2427978515625, -0.14068603515625, -0.0711669921875, -0.08074951171875, -0.1668701171875, -0.2625732421875, -0.227630615234375, -0.364288330078125, -0.3048095703125, -0.073760986328125, -0.084625244140625, -0.09783935546875, -0.06524658203125, -0.037322998046875, -0.052764892578125, -0.0020751953125, 0.1044921875, 0.11383056640625, -0.0050048828125, -0.13726806640625, -0.060791015625, 0.102020263671875, 0.174163818359375, 0.0224609375, -0.06365966796875, 0.040069580078125, 0.036224365234375, 0.10809326171875, 0.25335693359375, 0.397552490234375, 0.319793701171875, 0.04486083984375, -0.00787353515625, -0.0826416015625, -0.0626220703125, 0.06475830078125, 0.132720947265625, 0.315338134765625, 0.348236083984375, 0.31103515625, 0.206939697265625, 0.02978515625, 0.090789794921875, 0.126129150390625, 0.11895751953125, 0.151031494140625, 0.134246826171875, 0.064666748046875, -0.159576416015625, -0.248260498046875, -0.130096435546875, -0.128997802734375, -0.0440673828125, 0.29901123046875, 0.400848388671875, 0.212158203125, 0.164154052734375, 0.1925048828125, 0.204833984375, 0.1300048828125, 0.062042236328125, 0.0621337890625, -0.005645751953125, 0.132110595703125, 0.30535888671875, 0.342926025390625, 0.3685302734375, 0.19403076171875, 0.014495849609375, -0.05145263671875, -0.026153564453125, 0.110809326171875, 0.175689697265625, 0.14898681640625, 0.099853515625, 0.160797119140625, 0.28460693359375, 0.21795654296875, 0.096435546875, 0.131011962890625, 0.139617919921875, 0.1119384765625, 0.140167236328125, 0.063446044921875, -0.051788330078125, -0.066497802734375, 0.053070068359375, 0.16845703125, 0.178131103515625, 0.2095947265625, 0.20892333984375, 0.1214599609375, -0.0062255859375, 0.02252197265625, 0.169281005859375, 0.146575927734375, 0.116607666015625, 0.17706298828125, 0.263519287109375, 0.167572021484375, -0.074493408203125, -0.002838134765625, 0.178253173828125, 0.18597412109375, 0.158233642578125, 0.1856689453125, 0.194671630859375, 0.05572509765625, 0.025421142578125, 0.125823974609375, 0.096099853515625, 0.094635009765625, 0.1485595703125, 0.17242431640625, 0.22265625, 0.100067138671875, -0.07476806640625, -0.045166015625, -0.031402587890625, 0.003570556640625, 0.085357666015625, 0.031341552734375, -0.04022216796875, -0.052459716796875, -0.01885986328125, 0.015228271484375, -0.012725830078125, -0.11968994140625, -0.247406005859375, -0.270721435546875, -0.24151611328125}; 11 | 12 | }; // end namespace -------------------------------------------------------------------------------- /tests/test-headers/wav_stereo_16bit_44100.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace wav_stereo_16bit_44100 { 4 | 5 | int numSamplesPerChannel = 352800; 6 | int bitDepth = 16; 7 | uint32_t sampleRate = 44100; 8 | int numChannels = 2; 9 | 10 | std::vector> testBuffer = {{0.0, -9.1552734375e-05, -0.00054931640625, -0.001190185546875, -0.00128173828125, 0.001983642578125, 0.01055908203125, 0.014495849609375, 0.009765625, -0.004638671875, -0.02252197265625, -0.016510009765625, 0.00762939453125, 0.016693115234375, 0.00927734375, 0.003326416015625, 0.00128173828125, -0.00262451171875, -0.002960205078125, -0.0047607421875, -0.004425048828125, -0.020904541015625, -0.0406494140625, -0.0335693359375, -0.029541015625, -0.028472900390625, -0.021820068359375, -0.018157958984375, -0.0096435546875, 0.011688232421875, 0.035186767578125, 0.0457763671875, 0.045166015625, 0.0595703125, 0.073455810546875, 0.06561279296875, 0.071868896484375, 0.059326171875, 0.0093994140625, -0.032958984375, 0.01373291015625, -0.051055908203125, 0.033660888671875, 0.107086181640625, -0.042236328125, 0.0374755859375, -0.07269287109375, 0.036834716796875, 0.106475830078125, -0.051483154296875, 0.010162353515625, -0.06182861328125, 0.085662841796875, 0.104461669921875, 0.077178955078125, 0.05010986328125, 0.0333251953125, 0.138336181640625, 0.124298095703125, 0.1722412109375, 0.084716796875, 0.10321044921875, 0.0732421875, 0.063934326171875, 0.107696533203125, 0.063140869140625, 0.046356201171875, -0.013458251953125, 0.04345703125, 0.08270263671875, 0.109619140625, 0.06256103515625, 0.08746337890625, 0.10504150390625, 0.060577392578125, 0.035430908203125, -0.045196533203125, -0.02105712890625, -0.054901123046875, 0.001068115234375, 0.08062744140625, 0.044830322265625, 0.015380859375, 0.031585693359375, 0.10845947265625, 0.187469482421875, 0.161468505859375, 0.066253662109375, 0.061431884765625, 0.078826904296875, 0.073211669921875, -0.054290771484375, -0.057708740234375, -0.00146484375, -0.047943115234375, 0.0653076171875, 0.079925537109375, 0.001190185546875, 0.08831787109375, 0.05804443359375, 0.05072021484375, 0.14404296875, 0.022003173828125, 0.084014892578125, 0.122406005859375, 0.1221923828125, 0.154815673828125, 0.001495361328125, 0.0361328125, 0.013519287109375, 0.0263671875, 0.02099609375, -0.058013916015625, -0.041015625, -0.0712890625, -0.0126953125, 0.002899169921875, 0.00677490234375, -0.008544921875, -0.0557861328125, -0.06121826171875, -0.035369873046875, -0.00250244140625, 0.034912109375, 0.065673828125, 0.001373291015625, -0.031219482421875, -0.12091064453125, -0.159271240234375, -0.15771484375, -0.233642578125, -0.17938232421875, -0.133697509765625, -0.10784912109375, -0.122406005859375, -0.138427734375, -0.06597900390625, -0.088623046875, -0.07586669921875, -0.0291748046875, -0.079498291015625, -0.04180908203125, -0.024627685546875, -0.07989501953125, -0.000457763671875, 0.0233154296875, 0.02703857421875, 0.05950927734375, -0.001220703125, 0.000335693359375, -0.00848388671875, -0.030029296875, -0.0479736328125, -0.06280517578125, -0.078399658203125, -0.080474853515625, -0.001434326171875, -0.050018310546875, -0.086517333984375, -0.074462890625, -0.07928466796875, -0.04638671875, -0.088226318359375, -0.094512939453125, -0.093353271484375, -0.112884521484375, -0.0833740234375, -0.084808349609375, -0.093902587890625, -0.056304931640625, -0.0721435546875, -0.095947265625, -0.060394287109375, -0.07598876953125, -0.063140869140625, -0.03704833984375, -0.05523681640625, -0.052490234375, -0.055877685546875, -0.058929443359375, -0.055877685546875, -0.055999755859375, -0.063873291015625, -0.058563232421875, -0.03863525390625, -0.0389404296875, 0.011322021484375, 0.057708740234375, 0.072113037109375, 0.15484619140625, 0.141021728515625, 0.098785400390625, 0.16357421875, 0.13140869140625, 0.0897216796875, 0.082122802734375, 0.01055908203125, -0.009429931640625, -0.013092041015625, -0.03692626953125, -0.05224609375, -0.0833740234375, -0.05377197265625, -0.037689208984375, -0.065216064453125, -0.02923583984375, -0.040863037109375, -0.05072021484375, 0.026336669921875, 0.047149658203125, 0.03546142578125, 0.035003662109375, 0.06072998046875, 0.070892333984375, 0.039794921875, 0.064453125, 0.032562255859375, 0.016143798828125, 0.048583984375, 0.0120849609375, 0.0284423828125, 0.023223876953125, -0.013641357421875, 0.003326416015625, -0.006072998046875, -0.02593994140625, -0.017791748046875, 0.003631591796875, 0.000701904296875, -0.03082275390625, -0.019744873046875, -0.012237548828125, -0.021820068359375, 0.02117919921875, 0.037139892578125, -0.001495361328125, 0.01947021484375, 0.03375244140625, 0.0155029296875, 0.063751220703125, 0.052947998046875, 0.092254638671875, 0.12091064453125, 0.09771728515625, 0.142486572265625, 0.088104248046875, 0.10980224609375, 0.12286376953125, 0.092498779296875, 0.078521728515625, 0.04241943359375, 0.088592529296875, 0.10113525390625, 0.091949462890625, 0.093505859375, 0.086029052734375, 0.069000244140625, 0.098785400390625, 0.087310791015625, 0.082794189453125, 0.063873291015625, 0.038330078125, 0.047210693359375, 0.013427734375, 0.04443359375, 0.007080078125, 0.009979248046875, -0.01641845703125, -0.010986328125, -0.01239013671875, -0.031463623046875, 0.023834228515625, -0.0289306640625, 0.00579833984375, -0.046722412109375, -0.0147705078125, 0.018157958984375, 0.021514892578125, 0.02850341796875, -0.006866455078125, 0.051239013671875, -0.05078125, -0.0111083984375, -0.009368896484375, 0.01312255859375, 0.01922607421875, -0.013427734375, 0.0438232421875, -0.078399658203125, -0.049041748046875, -0.033538818359375, -0.045867919921875, -0.03564453125, -0.04864501953125, -0.064666748046875, -0.068359375, -0.071746826171875, -0.0931396484375, -0.0380859375, -0.08538818359375, -0.065704345703125, -0.082061767578125, -0.069549560546875, -0.054931640625, -0.1007080078125, -0.057586669921875, -0.1146240234375, -0.09619140625, -0.12591552734375, -0.116729736328125, -0.075653076171875, -0.114990234375, -0.05810546875, -0.1025390625, -0.073577880859375, -0.085601806640625, -0.13800048828125, -0.0701904296875, -0.14849853515625, -0.15142822265625, -0.131988525390625, -0.11383056640625, -0.11053466796875, -0.161376953125, -0.11029052734375, -0.135498046875, -0.116943359375, -0.084228515625, -0.019439697265625, -0.03717041015625, -0.04473876953125, 0.0430908203125, -0.01092529296875, 0.066375732421875, 0.055511474609375, 0.062225341796875, 0.06390380859375, -0.02301025390625, 0.037445068359375, 0.024993896484375, 0.06573486328125, 0.0367431640625, 0.006378173828125, 0.045318603515625, -0.033905029296875, 0.015960693359375, 0.010162353515625, -0.035064697265625, 0.039886474609375, -0.04119873046875, -0.00555419921875, 0.0078125, -0.04998779296875, 0.005584716796875, -0.042724609375, 0.0107421875, -0.001617431640625, 0.00384521484375, 0.037322998046875, -0.012786865234375, 0.012603759765625, -0.022430419921875, -0.017059326171875, -0.021392822265625, -0.047943115234375, -0.02191162109375, 0.014495849609375, -0.003997802734375, -0.014862060546875, -0.01690673828125, -0.008880615234375, 0.005340576171875, -0.02423095703125, 0.018096923828125, 0.00567626953125, -0.0106201171875, -0.00958251953125, -0.016845703125, 0.006622314453125, 0.000335693359375, 0.0013427734375, 0.068084716796875, 0.046722412109375, 0.05419921875, 0.14739990234375, 0.0347900390625, 0.083740234375, 0.0494384765625, 0.01873779296875, 0.119903564453125, -0.026214599609375, 0.084625244140625, 0.11651611328125, 0.040252685546875, 0.07470703125, 0.0350341796875, 0.080535888671875, 0.08270263671875, 0.053741455078125, 0.071441650390625, 0.12750244140625, 0.133880615234375, 0.13836669921875, 0.129852294921875, 0.0904541015625, 0.086181640625, 0.09222412109375, 0.074462890625, 0.0079345703125, 0.036224365234375, -0.00897216796875, -0.015411376953125, 0.017425537109375, -0.053070068359375, -0.012725830078125, -0.008758544921875, 0.009490966796875, 0.02520751953125, 0.035400390625, 0.061309814453125, 0.028106689453125, 0.064971923828125, 0.09173583984375, 0.064239501953125, 0.037445068359375, 0.071044921875, -0.00439453125, -0.029083251953125, 0.012908935546875, -0.022979736328125, 0.025634765625, -0.047943115234375, -0.017364501953125, 0.01617431640625, -0.0498046875, -0.022247314453125, -0.02459716796875, 0.016326904296875, -0.0391845703125, -0.05670166015625, -0.028350830078125, -0.029266357421875, -0.01300048828125, -0.062591552734375, -0.062042236328125, -0.054351806640625, -0.049468994140625, -0.054534912109375, -0.054779052734375, -0.028778076171875, -0.03436279296875, -0.0391845703125, -0.037445068359375, -0.062835693359375, -0.08154296875, -0.06982421875, -0.092529296875, -0.117095947265625, -0.108154296875, -0.1209716796875, -0.14031982421875, -0.1102294921875, -0.109161376953125, -0.09857177734375, -0.05816650390625, -0.067169189453125, -0.06890869140625, -0.06353759765625, -0.0526123046875, -0.036224365234375, -0.0203857421875, -0.011322021484375, -0.02117919921875, -0.03900146484375, -0.04412841796875, -0.032806396484375, -0.043609619140625, -0.033721923828125, -0.018157958984375, -0.041748046875, -0.017578125, 0.0009765625, -0.018310546875, -0.0189208984375, -0.06451416015625, -0.072662353515625, -0.055694580078125, -0.0848388671875, -0.07269287109375, -0.07049560546875, -0.099334716796875, -0.07208251953125, -0.063446044921875, -0.067291259765625, -0.012725830078125, -0.031158447265625, -0.066314697265625, -0.07171630859375, -0.064361572265625, -0.035369873046875}, {0.0, -9.1552734375e-05, -0.000640869140625, -0.00152587890625, -0.001739501953125, 0.0018310546875, 0.01220703125, 0.018310546875, 0.01416015625, -0.002288818359375, -0.022125244140625, -0.017120361328125, 0.00592041015625, 0.01422119140625, 0.008209228515625, 0.004974365234375, 0.003326416015625, -0.002899169921875, -0.005950927734375, -0.009735107421875, -0.00970458984375, -0.025482177734375, -0.047027587890625, -0.036529541015625, -0.036712646484375, -0.010009765625, 0.100830078125, 0.0028076171875, 0.0911865234375, 0.03314208984375, 0.103912353515625, 0.08502197265625, 0.0938720703125, 0.110626220703125, 0.103912353515625, 0.1353759765625, 0.079437255859375, 0.11279296875, 0.05511474609375, 0.051605224609375, -0.014190673828125, 0.010833740234375, 0.0167236328125, 0.026123046875, 0.02105712890625, -0.023590087890625, 0.011566162109375, -0.000152587890625, 0.04278564453125, -0.026458740234375, -0.040374755859375, -0.0748291015625, -0.002105712890625, 0.042755126953125, -0.0018310546875, -0.006439208984375, 0.016204833984375, 0.12127685546875, 0.11505126953125, 0.157501220703125, 0.156585693359375, 0.158447265625, 0.072052001953125, 0.096710205078125, 0.124755859375, 0.029937744140625, 0.070770263671875, 0.031524658203125, 0.0401611328125, 0.1253662109375, 0.12713623046875, 0.08575439453125, 0.1097412109375, 0.06207275390625, 0.09075927734375, -0.0177001953125, -0.050506591796875, 0.028594970703125, -0.067230224609375, 0.01055908203125, 0.053802490234375, 0.066314697265625, 0.004425048828125, -0.0123291015625, 0.032135009765625, 0.12835693359375, 0.10223388671875, 0.04541015625, 0.0635986328125, 0.004974365234375, 0.00341796875, -0.10369873046875, -0.10589599609375, -0.112640380859375, -0.039581298828125, -0.03106689453125, 0.02069091796875, 0.042694091796875, 0.0430908203125, 0.1123046875, 0.05047607421875, 0.141387939453125, 0.051361083984375, 0.087066650390625, 0.04693603515625, 0.079559326171875, 0.0545654296875, -0.0701904296875, -0.03802490234375, -0.06207275390625, -0.028778076171875, -0.13446044921875, -0.030242919921875, -0.1181640625, -0.04278564453125, -0.031982421875, -0.079925537109375, 0.032257080078125, -0.07757568359375, -0.0716552734375, -0.07073974609375, -0.036407470703125, -0.0604248046875, 0.037261962890625, -0.022491455078125, 0.00628662109375, -0.081329345703125, -0.11474609375, -0.087158203125, -0.18218994140625, -0.034576416015625, -0.14044189453125, 0.008331298828125, -0.058441162109375, -0.046905517578125, -0.027130126953125, -0.099822998046875, -0.019500732421875, -0.1219482421875, -0.025665283203125, -0.107635498046875, -0.0196533203125, -0.052947998046875, -0.060943603515625, -0.01690673828125, -0.063446044921875, 0.036773681640625, 0.007537841796875, 0.06610107421875, 0.03216552734375, 0.041290283203125, 0.009368896484375, -0.005645751953125, -0.035064697265625, -0.0838623046875, -0.0692138671875, -0.139434814453125, -0.0965576171875, -0.08587646484375, -0.126922607421875, -0.074462890625, -0.0316162109375, -0.056976318359375, -0.020599365234375, -0.01666259765625, 0.025604248046875, 0.003936767578125, -0.01483154296875, 0.04937744140625, 0.003997802734375, 0.02178955078125, 0.00836181640625, -0.05841064453125, -0.03564453125, -0.02789306640625, -0.037811279296875, -0.00299072265625, -0.075042724609375, -0.034149169921875, 0.00665283203125, 0.005218505859375, -0.010986328125, -0.051361083984375, 0.018218994140625, -0.015777587890625, 0.04473876953125, 0.033294677734375, 0.053253173828125, 0.091888427734375, 0.09503173828125, 0.092254638671875, 0.02728271484375, 0.09124755859375, 0.072418212890625, 0.094940185546875, 0.060028076171875, 0.04278564453125, 0.035247802734375, 0.02435302734375, 0.027069091796875, 0.011322021484375, 0.044219970703125, 0.012725830078125, 0.048828125, 0.022491455078125, 0.047637939453125, 0.028106689453125, 0.01837158203125, 0.061126708984375, 0.042205810546875, 0.043121337890625, 0.06036376953125, 0.06475830078125, 0.007720947265625, 0.06964111328125, 0.048980712890625, 0.067779541015625, 0.08233642578125, 0.084686279296875, 0.11572265625, 0.0615234375, 0.067779541015625, 0.005889892578125, -0.002471923828125, -0.021087646484375, -0.054840087890625, -0.064422607421875, -0.043212890625, 0.010528564453125, -0.008087158203125, -0.049835205078125, -0.023406982421875, 0.02337646484375, 0.018341064453125, 0.048004150390625, 0.0247802734375, 0.0157470703125, 0.021392822265625, 0.048797607421875, 0.043548583984375, 0.014251708984375, 0.02874755859375, 0.00341796875, 0.026458740234375, 0.0264892578125, 0.037078857421875, 0.0360107421875, 0.02447509765625, 0.018218994140625, 0.007843017578125, 0.01116943359375, 0.00225830078125, 0.0277099609375, 0.002410888671875, -0.022308349609375, -0.0125732421875, -0.032623291015625, -0.06744384765625, -0.0618896484375, -0.05328369140625, -0.072906494140625, -0.071380615234375, -0.076019287109375, -0.093902587890625, -0.069091796875, -0.05694580078125, -0.079010009765625, -0.048797607421875, -0.04388427734375, -0.07293701171875, -0.070068359375, -0.055908203125, -0.03973388671875, -0.046234130859375, -0.065216064453125, -0.05877685546875, -0.047088623046875, -0.02880859375, -0.03314208984375, -0.0303955078125, -0.0255126953125, -0.025390625, -0.019287109375, -0.030303955078125, -0.007293701171875, -0.025604248046875, -0.03057861328125, -0.040863037109375, -0.0419921875, -0.04180908203125, -0.0413818359375, -0.018157958984375, -0.068939208984375, -0.08447265625, -0.09844970703125, -0.067962646484375, -0.079681396484375, -0.11541748046875, -0.09478759765625, -0.05859375, -0.08709716796875, -0.08575439453125, -0.01434326171875, -0.0758056640625, -0.0628662109375, -0.06768798828125, -0.074554443359375, -0.094818115234375, -0.0494384765625, 0.008758544921875, -0.031585693359375, -0.01263427734375, -0.028167724609375, -0.013214111328125, -0.05621337890625, -0.02020263671875, -0.022430419921875, -0.01068115234375, -0.03125, -0.06561279296875, -0.00787353515625, -0.028839111328125, 0.00799560546875, -0.0430908203125, 0.004302978515625, -0.018096923828125, 0.0106201171875, 0.022186279296875, -0.00128173828125, 0.083587646484375, 0.0543212890625, 0.110626220703125, 0.046173095703125, 0.070220947265625, 0.061370849609375, 0.066131591796875, 0.09063720703125, 0.039764404296875, 0.059173583984375, 0.03277587890625, 0.08856201171875, 0.07855224609375, 0.072845458984375, 0.0806884765625, 0.094085693359375, 0.03546142578125, 0.05865478515625, 0.08245849609375, 0.02001953125, 0.022491455078125, -0.016510009765625, 0.018646240234375, 0.0296630859375, 0.035980224609375, 0.040985107421875, 0.0677490234375, 0.01470947265625, 0.07342529296875, 0.094482421875, 0.02178955078125, 0.05194091796875, 0.001312255859375, 0.0589599609375, 0.025177001953125, 0.038818359375, 0.058135986328125, 0.0474853515625, 0.075164794921875, 0.02508544921875, 0.04376220703125, 0.051177978515625, 0.013824462890625, 0.001708984375, 0.027801513671875, 0.02581787109375, 0.04400634765625, 0.023956298828125, 0.029876708984375, 0.00372314453125, 0.004364013671875, -0.016937255859375, -0.00579833984375, 0.039276123046875, 0.037841796875, 0.054412841796875, -0.02734375, 0.00213623046875, -0.03363037109375, 0.001617431640625, -0.013580322265625, 0.0067138671875, 0.0126953125, -0.01678466796875, 0.01702880859375, -0.073944091796875, 0.00616455078125, -0.051055908203125, 0.043609619140625, -0.0029296875, 0.008056640625, 0.0367431640625, -0.0478515625, 0.042236328125, 0.00408935546875, 0.03997802734375, -0.064849853515625, 0.042205810546875, -0.02825927734375, -0.012298583984375, -0.017181396484375, -0.029571533203125, 0.05615234375, -0.11090087890625, -0.017364501953125, -0.079833984375, -0.00347900390625, -0.073211669921875, -0.060028076171875, -0.002288818359375, -0.04864501953125, -0.006378173828125, -0.100372314453125, -0.0252685546875, -0.05938720703125, -0.009735107421875, -0.056854248046875, -0.069183349609375, -0.069732666015625, -0.04888916015625, -0.060211181640625, -0.1201171875, -0.081085205078125, -0.1424560546875, -0.075592041015625, -0.13555908203125, -0.102020263671875, -0.17364501953125, -0.14166259765625, -0.0902099609375, -0.1646728515625, -0.067596435546875, -0.13037109375, -0.083465576171875, -0.07037353515625, -0.05718994140625, -0.03436279296875, -0.03662109375, -0.0535888671875, -0.0323486328125, -0.010162353515625, -0.074188232421875, -0.0296630859375, -0.039215087890625, -0.0382080078125, -0.034515380859375, -0.02789306640625, -0.0045166015625, -0.0484619140625, -0.0625, -0.00299072265625, -0.038848876953125, -0.0220947265625, -0.0201416015625, -0.028045654296875, 0.0057373046875, -0.060516357421875, 0.01171875, 0.007843017578125, 0.00872802734375, -0.014068603515625, -0.0230712890625, 0.00115966796875, -0.03009033203125, 0.01446533203125, -0.012451171875, 0.0135498046875, 0.024749755859375, 0.034698486328125, 0.019287109375, 0.03118896484375, 0.039306640625, 0.0341796875, 0.0401611328125, 0.01837158203125, 0.013397216796875, -0.025390625, 0.009002685546875, -0.0059814453125, 0.024810791015625, 0.0177001953125, -0.003021240234375, 0.00396728515625, 0.00775146484375, 0.047637939453125, 0.066558837890625, 0.082763671875, 0.041717529296875, 0.067840576171875, 0.036376953125, 0.061370849609375}}; 11 | 12 | }; // end namespace -------------------------------------------------------------------------------- /tests/test-headers/wav_stereo_16bit_48000.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace wav_stereo_16bit_48000 { 4 | 5 | int numSamplesPerChannel = 384000; 6 | int bitDepth = 16; 7 | uint32_t sampleRate = 48000; 8 | int numChannels = 2; 9 | 10 | std::vector> testBuffer = {{0.009552001953125, 0.0015869140625, -0.0078125, 0.010101318359375, 0.015838623046875, -0.0091552734375, -0.03271484375, 0.012451171875, 0.024200439453125, -0.041015625, 0.00286865234375, 0.0247802734375, -0.011444091796875, -0.0018310546875, -0.053619384765625, -0.053497314453125, -0.00543212890625, -0.003875732421875, -0.02850341796875, -0.038543701171875, -0.0006103515625, -0.059417724609375, -0.076080322265625, -0.024627685546875, -0.008544921875, 0.067718505859375, 0.060882568359375, 0.0457763671875, 0.07611083984375, 0.05322265625, 0.03656005859375, 0.038330078125, 0.104095458984375, 0.115631103515625, 0.072357177734375, 0.028594970703125, -0.024505615234375, 0.027862548828125, 0.06280517578125, 0.042327880859375, -0.00823974609375, -0.079071044921875, -0.095672607421875, -0.14447021484375, -0.1536865234375, -0.06884765625, -0.00634765625, -0.017547607421875, -0.019195556640625, -0.017913818359375, -0.0867919921875, -0.058135986328125, 0.014312744140625, 0.002349853515625, -0.029998779296875, -0.01702880859375, 0.101715087890625, 0.124664306640625, 0.10516357421875, 0.167205810546875, 0.144317626953125, 0.11053466796875, 0.026947021484375, -0.04449462890625, -0.00347900390625, 0.0157470703125, 0.073699951171875, 0.08599853515625, 0.073974609375, 0.12091064453125, 0.08251953125, 0.03070068359375, 0.022186279296875, 0.03271484375, 0.043975830078125, 0.026641845703125, -0.00518798828125, -0.00439453125, 0.05633544921875, 0.064910888671875, 0.030487060546875, -0.00836181640625, -0.07415771484375, -0.077545166015625, -0.04986572265625, -0.04522705078125, -0.056732177734375, -0.085662841796875, -0.06280517578125, -0.021484375, -0.04278564453125, -0.101104736328125, -0.155517578125, -0.124176025390625, -0.035064697265625, -0.00750732421875, -0.07073974609375, -0.123687744140625, -0.000152587890625, 0.059356689453125, -0.06842041015625, -0.031280517578125, 0.10589599609375, 0.0687255859375, -0.110198974609375, -0.18499755859375, -0.11370849609375, -0.054718017578125, -0.004791259765625, -0.037841796875, -0.04937744140625, -0.0015869140625, -0.0987548828125, -0.160125732421875, -0.09619140625, 0.014801025390625, 0.071868896484375, 0.0018310546875, 0.035736083984375, 0.05902099609375, -0.062286376953125, -0.1287841796875, -0.130462646484375, -0.073516845703125, -0.072784423828125, -0.073394775390625, 0.0230712890625, 0.00372314453125, -0.04766845703125, -0.03338623046875, 0.0394287109375, 0.1282958984375, 0.09771728515625, 0.02508544921875, -0.09869384765625, -0.12109375, 0.075653076171875, 0.1900634765625, 0.168914794921875, 0.11016845703125, 0.03326416015625, -0.010040283203125, -0.02618408203125, -0.06951904296875, -0.10546875, -0.00164794921875, 0.1368408203125, 0.147186279296875, 0.119659423828125, 0.10919189453125, 0.049591064453125, -0.062286376953125, -0.0689697265625, 0.0321044921875, 0.073089599609375, 0.090545654296875, 0.085784912109375, 0.052978515625, 0.02081298828125, -0.023681640625, 0.031646728515625, 0.06005859375, 0.00341796875, 0.017913818359375, 0.0389404296875, 0.0357666015625, -0.0186767578125, -0.037506103515625, 0.08551025390625, 0.10662841796875, 0.029052734375, 0.04766845703125, 0.101593017578125, 0.19451904296875, 0.18646240234375, -0.0447998046875, -0.17230224609375, -0.128021240234375, -0.120513916015625, -0.140777587890625, -0.098114013671875, -0.01129150390625, 0.07672119140625, 0.165313720703125, 0.10693359375, 0.02984619140625, 0.060333251953125, 0.014678955078125, -0.044403076171875, -0.136688232421875, -0.201812744140625, -0.1259765625, -0.0650634765625, -0.00689697265625, 0.05084228515625, -0.000335693359375, -0.142791748046875, -0.166229248046875, -0.046112060546875, 0.0142822265625, 0.078857421875, 0.110107421875, -0.0355224609375, -0.19854736328125, -0.138946533203125, 0.069854736328125, 0.191558837890625, 0.25177001953125, 0.127105712890625, -0.2283935546875, -0.421295166015625, -0.373291015625, -0.28814697265625, -0.2061767578125, -0.085052490234375, -0.047576904296875, -0.176544189453125, -0.15478515625, 0.081573486328125, 0.2298583984375, 0.281982421875, 0.2686767578125, 0.080902099609375, -0.117950439453125, -0.122314453125, -0.0638427734375, -0.079559326171875, -0.1121826171875, -0.1019287109375, -0.10064697265625, -0.107330322265625, -0.05731201171875, 0.015625, 0.083038330078125, 0.101776123046875, 0.041229248046875, 0.0211181640625, 0.09796142578125, 0.126800537109375, 0.074920654296875, 0.05908203125, 0.073822021484375, 0.08807373046875, 0.06243896484375, 0.0130615234375, 0.03302001953125, 0.024993896484375, -0.07000732421875, -0.1373291015625, -0.197052001953125, -0.171844482421875, 0.026580810546875, 0.0965576171875, -0.010711669921875, -0.04388427734375, -0.0458984375, -0.06494140625, -0.001617431640625, 0.07379150390625, 0.03271484375, -0.004180908203125, -0.047210693359375, -0.12298583984375, 0.003326416015625, 0.147247314453125, 0.130767822265625, 0.1695556640625, 0.235626220703125, 0.239105224609375, 0.21185302734375, 0.1990966796875, 0.246368408203125, 0.300537109375, 0.3109130859375, 0.2421875, 0.082183837890625, -0.01959228515625, -9.1552734375e-05, 0.018768310546875, 0.01885986328125, 0.024169921875, 0.026458740234375, 0.056488037109375, 0.101837158203125, 0.10894775390625, 0.08154296875, 0.059356689453125, 0.060516357421875, 0.000244140625, -0.133453369140625, -0.200775146484375, -0.181915283203125, -0.08795166015625, -0.01397705078125, 0.0185546875, 0.091705322265625, 0.020263671875, -0.04205322265625, 0.059478759765625, 0.107666015625, 0.171142578125, 0.205352783203125, 0.18194580078125, 0.14117431640625, 0.02252197265625, 0.030181884765625, 0.070587158203125, -0.05975341796875, -0.18084716796875, -0.244293212890625, -0.320098876953125, -0.251617431640625, -0.054229736328125, -0.018463134765625, -0.125518798828125, -0.232025146484375, -0.279693603515625, -0.247772216796875, -0.1702880859375, -0.0498046875, -0.118682861328125, -0.30462646484375, -0.311309814453125, -0.362091064453125, -0.433197021484375, -0.312255859375, -0.1749267578125, -0.144317626953125, -0.169464111328125, -0.177154541015625, -0.135162353515625, -0.023284912109375, 0.10821533203125, 0.157501220703125, 0.149810791015625, 0.190277099609375, 0.241485595703125, 0.150634765625, 0.03094482421875, 0.0299072265625, 0.087677001953125, 0.152130126953125, 0.1353759765625, 0.104095458984375, 0.16558837890625, 0.257171630859375, 0.3074951171875, 0.286773681640625, 0.2109375, 0.028167724609375, -0.116851806640625, -0.14923095703125, -0.1326904296875, 0.029022216796875, 0.1065673828125, 0.118865966796875, 0.217376708984375, 0.22393798828125, 0.1204833984375, -0.079345703125, -0.078521728515625, 0.060028076171875, 0.05572509765625, 0.0697021484375, -0.0111083984375, -0.0888671875, -0.10675048828125, -0.156219482421875, -0.143646240234375, -0.13800048828125, -0.0911865234375, -0.071319580078125, -0.080596923828125, -0.10809326171875, -0.14617919921875, -0.1256103515625, -0.19732666015625, -0.169189453125, -0.058258056640625, -0.064849853515625, -0.05877685546875, -0.033721923828125, -0.016204833984375, -0.03680419921875, -0.02386474609375, 0.049957275390625, 0.08245849609375, 0.020355224609375, -0.069580078125, -0.035797119140625, 0.062042236328125, 0.1090087890625, 0.029937744140625, -0.01580810546875, 0.038177490234375, 0.0303955078125, 0.06951904296875, 0.162689208984375, 0.260223388671875, 0.225921630859375, 0.071990966796875, 0.049835205078125, 0.035736083984375, 0.056365966796875, 0.10784912109375, 0.12786865234375, 0.22332763671875, 0.242401123046875, 0.22943115234375, 0.189666748046875, 0.09967041015625, 0.12066650390625, 0.13116455078125, 0.126678466796875, 0.13763427734375, 0.124664306640625, 0.09564208984375, -0.025970458984375, -0.087005615234375, -0.0201416015625, -0.021209716796875, -0.00762939453125, 0.15771484375, 0.230712890625, 0.136444091796875, 0.096099853515625, 0.118072509765625, 0.1395263671875, 0.092926025390625, 0.045013427734375, 0.04302978515625, 0.0050048828125, 0.062896728515625, 0.131866455078125, 0.1470947265625, 0.175201416015625, 0.094818115234375, -0.000213623046875, -0.036224365234375, -0.027557373046875, 0.031707763671875, 0.07171630859375, 0.07440185546875, 0.0364990234375, 0.0478515625, 0.118438720703125, 0.095916748046875, 0.021484375, 0.025604248046875, 0.035308837890625, 0.030670166015625, 0.041656494140625, -0.0079345703125, -0.066253662109375, -0.07470703125, -0.02252197265625, 0.03021240234375, 0.0255126953125, 0.03350830078125, 0.030975341796875, -0.014495849609375, -0.082794189453125, -0.06915283203125, 0.013824462890625, 0.001068115234375, -0.0189208984375, 0.022308349609375, 0.068878173828125, 0.00653076171875, -0.11773681640625, -0.064849853515625, 0.031707763671875, 0.0272216796875, 0.01507568359375, 0.04547119140625, 0.060638427734375, -0.01031494140625, -0.01934814453125, 0.047210693359375, 0.038360595703125, 0.031097412109375, 0.05364990234375, 0.06817626953125, 0.103668212890625, 0.049224853515625, -0.03436279296875, -0.00872802734375, 0.000457763671875, 0.01220703125, 0.052032470703125, 0.028594970703125, 0.002655029296875, -0.0074462890625, 0.001617431640625, 0.03961181640625, 0.047576904296875, -0.0181884765625, -0.10174560546875, -0.114532470703125, -0.092498779296875}, {0.008148193359375, 0.001922607421875, -0.00592041015625, 0.006072998046875, 0.00433349609375, -0.02215576171875, -0.044464111328125, -0.01068115234375, -0.00244140625, -0.05548095703125, -0.0177001953125, 0.002105712890625, -0.02801513671875, -0.019866943359375, -0.06005859375, -0.055755615234375, -0.007293701171875, 0.004150390625, -0.007049560546875, -0.006103515625, 0.03515625, 0.00927734375, 0.02313232421875, 0.071685791015625, 0.07293701171875, 0.133270263671875, 0.122589111328125, 0.072662353515625, 0.051727294921875, 0.025482177734375, 0.02557373046875, 0.025848388671875, 0.067657470703125, 0.048370361328125, -0.04010009765625, -0.1241455078125, -0.1771240234375, -0.112274169921875, -0.071868896484375, -0.0731201171875, -0.041473388671875, -0.02825927734375, -0.0421142578125, -0.0849609375, -0.06732177734375, 0.01202392578125, 0.096893310546875, 0.162933349609375, 0.19573974609375, 0.169830322265625, 0.08270263671875, 0.079132080078125, 0.08416748046875, 0.044342041015625, 0.068115234375, 0.085540771484375, 0.0640869140625, -0.01177978515625, 0.028564453125, 0.186981201171875, 0.166229248046875, 0.0439453125, -0.076416015625, -0.101318359375, -0.02947998046875, -0.042877197265625, -0.049591064453125, -0.047698974609375, -0.059356689453125, -0.048614501953125, -0.070220947265625, -0.0772705078125, -0.10601806640625, -0.1336669921875, -0.081024169921875, -0.039794921875, -0.085968017578125, -0.111297607421875, -0.022979736328125, 0.026153564453125, -0.009002685546875, -0.07135009765625, -0.1192626953125, -0.05718994140625, -0.002593994140625, -0.051422119140625, -0.09393310546875, -0.060150146484375, 0.028045654296875, 0.038482666015625, -0.068939208984375, -0.1319580078125, -0.078521728515625, 0.01861572265625, 0.028228759765625, -0.05096435546875, -0.081024169921875, -0.034271240234375, 0.04180908203125, 0.0048828125, -0.035675048828125, 0.102386474609375, 0.15423583984375, 0.04058837890625, -0.082183837890625, -0.13922119140625, -0.101898193359375, -0.039794921875, 0.004150390625, 0.0057373046875, 0.03619384765625, 0.017059326171875, -0.09625244140625, -0.0316162109375, 0.0819091796875, 0.076812744140625, 0.0758056640625, 0.0992431640625, 0.17840576171875, 0.147674560546875, 0.015838623046875, -0.00518798828125, 0.00091552734375, 0.0130615234375, 0.01348876953125, 0.0511474609375, 0.1390380859375, 0.091339111328125, 0.037750244140625, 0.054046630859375, 0.1004638671875, 0.193756103515625, 0.20916748046875, 0.10687255859375, -0.081573486328125, -0.08984375, 0.1466064453125, 0.2391357421875, 0.17156982421875, 0.115692138671875, 0.055084228515625, -0.006439208984375, -0.039642333984375, -0.05389404296875, -0.0479736328125, 0.032135009765625, 0.111846923828125, 0.10772705078125, 0.109222412109375, 0.100799560546875, -0.0164794921875, -0.139556884765625, -0.110595703125, -0.024688720703125, 0.008819580078125, 0.064605712890625, 0.07708740234375, 0.0361328125, 0.00701904296875, -0.030426025390625, -0.00384521484375, -0.011688232421875, -0.064239501953125, -0.0157470703125, -0.005157470703125, -0.078369140625, -0.106658935546875, -0.021697998046875, 0.059661865234375, -0.04376220703125, -0.116790771484375, -0.00091552734375, 0.088134765625, 0.110504150390625, 0.01934814453125, -0.21356201171875, -0.297210693359375, -0.2626953125, -0.3038330078125, -0.307708740234375, -0.193145751953125, -0.068511962890625, -0.0133056640625, 0.0303955078125, 0.0323486328125, 0.024322509765625, -0.00604248046875, -0.1163330078125, -0.135650634765625, -0.16473388671875, -0.24261474609375, -0.186920166015625, -0.085418701171875, -0.001800537109375, 0.052032470703125, 0.00762939453125, -0.127838134765625, -0.16314697265625, -0.055511474609375, 0.00048828125, 0.037994384765625, 0.073211669921875, -0.026123046875, -0.193634033203125, -0.15155029296875, 0.107208251953125, 0.250732421875, 0.242431640625, 0.0946044921875, -0.209747314453125, -0.3900146484375, -0.3736572265625, -0.297637939453125, -0.20697021484375, -0.1026611328125, -0.073089599609375, -0.14495849609375, -0.07171630859375, 0.140960693359375, 0.254791259765625, 0.310791015625, 0.309478759765625, 0.125823974609375, -0.09967041015625, -0.154876708984375, -0.09375, -0.047088623046875, -0.038299560546875, -0.044403076171875, -0.0491943359375, -0.0184326171875, 0.06207275390625, 0.14190673828125, 0.19647216796875, 0.206024169921875, 0.18145751953125, 0.19793701171875, 0.243682861328125, 0.234130859375, 0.212921142578125, 0.238861083984375, 0.25628662109375, 0.242828369140625, 0.173248291015625, 0.101165771484375, 0.14263916015625, 0.14605712890625, 0.009429931640625, -0.079132080078125, -0.09832763671875, -0.061798095703125, 0.082000732421875, 0.115478515625, 0.014495849609375, -0.026336669921875, -0.050506591796875, -0.03863525390625, 0.067047119140625, 0.10845947265625, 0.00506591796875, -0.049774169921875, -0.06890869140625, -0.135406494140625, -0.038238525390625, 0.1025390625, 0.1170654296875, 0.16070556640625, 0.206512451171875, 0.203277587890625, 0.195220947265625, 0.18792724609375, 0.20587158203125, 0.22711181640625, 0.23492431640625, 0.186248779296875, 0.046478271484375, -0.036224365234375, -0.028594970703125, -0.061279296875, -0.0950927734375, -0.045501708984375, 0.02386474609375, -0.005126953125, -0.103363037109375, -0.1416015625, -0.13311767578125, -0.14404296875, -0.15185546875, -0.2060546875, -0.30322265625, -0.3173828125, -0.263214111328125, -0.174896240234375, -0.095062255859375, -0.032379150390625, 0.02777099609375, -0.065155029296875, -0.126953125, -0.029205322265625, 0.0206298828125, 0.083984375, 0.132049560546875, 0.11151123046875, 0.050811767578125, -0.045806884765625, -0.0123291015625, 0.00885009765625, -0.1513671875, -0.257781982421875, -0.274200439453125, -0.344573974609375, -0.299774169921875, -0.087860107421875, -0.03240966796875, -0.158233642578125, -0.252532958984375, -0.249725341796875, -0.2222900390625, -0.2042236328125, -0.11883544921875, -0.14630126953125, -0.286346435546875, -0.310394287109375, -0.365478515625, -0.419708251953125, -0.295867919921875, -0.157135009765625, -0.13360595703125, -0.15350341796875, -0.148468017578125, -0.10870361328125, 0.008697509765625, 0.1446533203125, 0.194793701171875, 0.2056884765625, 0.25213623046875, 0.27337646484375, 0.174560546875, 0.08740234375, 0.09844970703125, 0.140380859375, 0.2135009765625, 0.213104248046875, 0.1611328125, 0.2122802734375, 0.322479248046875, 0.373016357421875, 0.3465576171875, 0.2718505859375, 0.115020751953125, 0.017364501953125, -0.00787353515625, -0.02764892578125, 0.118408203125, 0.221923828125, 0.2227783203125, 0.286041259765625, 0.293548583984375, 0.169830322265625, -0.040191650390625, -0.00457763671875, 0.164337158203125, 0.141204833984375, 0.104949951171875, 0.0435791015625, 0.00958251953125, -0.01446533203125, -0.09429931640625, -0.108062744140625, -0.104888916015625, -0.049468994140625, 0.00018310546875, -0.000213623046875, -0.058685302734375, -0.11651611328125, -0.1019287109375, -0.1669921875, -0.1356201171875, -0.015472412109375, -0.01983642578125, -0.039031982421875, -0.031494140625, -0.02117919921875, -0.015869140625, 0.021697998046875, 0.054595947265625, 0.031341552734375, -0.025360107421875, -0.067657470703125, -0.0250244140625, 0.040008544921875, 0.06512451171875, -0.0074462890625, -0.04791259765625, 0.001983642578125, 0.005706787109375, 0.038726806640625, 0.09051513671875, 0.137451171875, 0.093780517578125, -0.027069091796875, -0.0577392578125, -0.11834716796875, -0.1190185546875, -0.043060302734375, 0.004791259765625, 0.092071533203125, 0.105804443359375, 0.08160400390625, 0.017333984375, -0.07000732421875, -0.02978515625, -0.00506591796875, -0.00775146484375, 0.013458251953125, 0.009552001953125, -0.031005859375, -0.133544921875, -0.16131591796875, -0.109893798828125, -0.10784912109375, -0.036376953125, 0.141265869140625, 0.170135498046875, 0.07574462890625, 0.068023681640625, 0.074462890625, 0.065277099609375, 0.037109375, 0.016998291015625, 0.0191650390625, -0.010711669921875, 0.069244384765625, 0.1734619140625, 0.195892333984375, 0.193267822265625, 0.099273681640625, 0.0146484375, -0.01519775390625, 0.00140380859375, 0.0791015625, 0.10394287109375, 0.074676513671875, 0.063232421875, 0.113067626953125, 0.16607666015625, 0.1220703125, 0.074951171875, 0.105438232421875, 0.104248046875, 0.08135986328125, 0.098388671875, 0.071502685546875, 0.014373779296875, 0.00823974609375, 0.07562255859375, 0.13818359375, 0.1527099609375, 0.175994873046875, 0.178009033203125, 0.13592529296875, 0.07659912109375, 0.091644287109375, 0.155487060546875, 0.1455078125, 0.135498046875, 0.154815673828125, 0.194549560546875, 0.1611328125, 0.043212890625, 0.06201171875, 0.146514892578125, 0.1588134765625, 0.143096923828125, 0.1402587890625, 0.134002685546875, 0.066009521484375, 0.044830322265625, 0.078582763671875, 0.0577392578125, 0.063568115234375, 0.0948486328125, 0.10430908203125, 0.11895751953125, 0.05084228515625, -0.040374755859375, -0.036468505859375, -0.0318603515625, -0.008636474609375, 0.033355712890625, 0.002685546875, -0.042816162109375, -0.0450439453125, -0.020477294921875, -0.02435302734375, -0.06036376953125, -0.101470947265625, -0.1456298828125, -0.156219482421875, -0.149017333984375}}; 11 | 12 | }; // end namespace -------------------------------------------------------------------------------- /tests/test-headers/wav_stereo_32bit_48000.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace wav_stereo_32bit_48000 { 4 | 5 | int numSamplesPerChannel = 418909; 6 | int bitDepth = 32; 7 | uint32_t sampleRate = 48000; 8 | int numChannels = 2; 9 | 10 | std::vector> testBuffer = {{-0.10833723098039627, -0.13686230778694153, -0.08660777658224106, -0.07025191932916641, -0.07594943791627884, -0.10192184150218964, -0.11632838100194931, -0.09456843882799149, -0.11326359212398529, -0.12219168245792389, -0.10825426131486893, -0.1309429407119751, -0.11157312244176865, -0.09016415476799011, -0.0965714156627655, -0.12620578706264496, -0.14365583658218384, -0.11878309398889542, -0.1251625418663025, -0.12197279185056686, -0.13707268238067627, -0.16403384506702423, -0.12149179726839066, -0.11605630069971085, -0.13082683086395264, -0.12961497902870178, -0.16302011907100677, -0.16787879168987274, -0.1727980673313141, -0.17347824573516846, -0.15056578814983368, -0.13418999314308167, -0.13609308004379272, -0.15870068967342377, -0.15973517298698425, -0.16675157845020294, -0.1538539081811905, -0.13986317813396454, -0.1356811225414276, -0.11068937927484512, -0.11542622745037079, -0.11571431159973145, -0.14208760857582092, -0.18606315553188324, -0.15333223342895508, -0.1170574203133583, -0.12660381197929382, -0.1302478164434433, -0.12123790383338928, -0.1418413519859314, -0.19688516855239868, -0.21770331263542175, -0.20560204982757568, -0.1930108666419983, -0.18868814408779144, -0.1661619395017624, -0.13854163885116577, -0.1325310915708542, -0.11040335148572922, -0.12708288431167603, -0.17054039239883423, -0.21640004217624664, -0.24592463672161102, -0.21843625605106354, -0.1573750376701355, -0.11056780070066452, -0.09740602225065231, -0.12069782614707947, -0.2100597321987152, -0.22250661253929138, -0.1898784339427948, -0.18164417147636414, -0.1523897796869278, -0.15555024147033691, -0.14697620272636414, -0.16035667061805725, -0.18182522058486938, -0.19542503356933594, -0.20623499155044556, -0.1562727838754654, -0.12542715668678284, -0.1119709312915802, -0.07725507766008377, -0.08215560019016266, -0.10654792189598083, -0.1284656673669815, -0.140795037150383, -0.1548275202512741, -0.175393745303154, -0.16068312525749207, -0.15743035078048706, -0.1740831434726715, -0.1850689798593521, -0.14626285433769226, -0.13768750429153442, -0.14167004823684692, -0.13158604502677917, -0.2224844992160797, -0.1972336769104004, -0.14786580204963684, -0.16598083078861237, -0.10970427095890045, -0.14206169545650482, -0.21922466158866882, -0.2276635468006134, -0.2204207330942154, -0.1741165667772293, -0.1283014416694641, -0.1455855518579483, -0.12145467847585678, -0.12210126221179962, -0.1665816605091095, -0.16821958124637604, -0.15102557837963104, -0.09825979173183441, -0.07853254675865173, -0.0757584273815155, -0.04167184606194496, -0.03020879440009594, -0.07665292173624039, -0.0867912694811821, -0.06523621082305908, -0.08391410857439041, -0.08976593613624573, -0.0892600566148758, -0.061698853969573975, -0.05050971359014511, -0.0387004055082798, 0.004493299406021833, 0.00935047771781683, -0.000861787295434624, -0.04469887167215347, -0.12444597482681274, -0.15654629468917847, -0.15043316781520844, -0.1368141770362854, -0.09912170469760895, -0.10017985105514526, -0.09730787575244904, -0.09079402685165405, -0.13539952039718628, -0.11584442853927612, -0.0871509462594986, -0.09939737617969513, -0.09079309552907944, -0.07587186992168427, -0.015941079705953598, 0.011376189067959785, -0.02986397035419941, -0.048056282103061676, -0.05423866957426071, -0.009084882214665413, 0.06034950911998749, 0.07316169142723083, 0.04421554133296013, 0.026190321892499924, 0.02441880851984024, 0.023521097376942635, 0.051470398902893066, 0.07469034194946289, 0.06154932454228401, 0.006343642715364695, -0.03554345667362213, -0.06482252478599548, -0.1056675836443901, -0.07906777411699295, -0.010515891015529633, 0.03463919833302498, 0.10182815045118332, 0.12722797691822052, 0.07471873611211777, 0.06801177561283112, 0.015254026278853416, 0.013864085078239441, 0.09221803396940231, 0.0826478824019432, 0.10610705614089966, 0.12229252606630325, 0.09588494151830673, 0.0392443984746933, 0.007177992258220911, 0.05457144230604172, 0.060299959033727646, 0.052177149802446365, 0.0912666916847229, 0.1138489618897438, 0.0880434438586235, 0.09100965410470963, 0.10831927508115768, 0.08488117158412933, 0.09944018721580505, 0.15527090430259705, 0.1495298147201538, 0.12461885809898376, 0.10924600064754486, 0.13051281869411469, 0.18916931748390198, 0.21212251484394073, 0.26510581374168396, 0.2736929655075073, 0.2305777221918106, 0.20042501389980316, 0.17696787416934967, 0.19826193153858185, 0.22595231235027313, 0.21338365972042084, 0.21687710285186768, 0.2768402099609375, 0.2856462597846985, 0.2748701274394989, 0.24429206550121307, 0.23731593787670135, 0.2615853250026703, 0.2385004609823227, 0.25184887647628784, 0.2590377628803253, 0.2912565767765045, 0.2960257828235626, 0.28129681944847107, 0.2943141758441925, 0.2652760148048401, 0.2759816348552704, 0.2811919152736664, 0.26749080419540405, 0.2687794864177704, 0.286419540643692, 0.30105721950531006, 0.29055407643318176, 0.2720890939235687, 0.26196053624153137, 0.28323325514793396, 0.2852235734462738, 0.3042975664138794, 0.3309670686721802, 0.3482053279876709, 0.3756142854690552, 0.37282833456993103, 0.4028853476047516, 0.41528448462486267, 0.39297235012054443, 0.33393821120262146, 0.266926646232605, 0.34839409589767456, 0.36013832688331604, 0.3027712404727936, 0.33048728108406067, 0.31818675994873047, 0.3690297305583954, 0.4518803060054779, 0.4707958400249481, 0.47590383887290955, 0.4487761855125427, 0.408179372549057, 0.4058232009410858, 0.4089888632297516, 0.39989686012268066, 0.4162187874317169, 0.4089035391807556, 0.420042484998703, 0.4633650481700897, 0.47009241580963135, 0.4320559501647949, 0.37477734684944153, 0.3501797020435333, 0.36864542961120605, 0.37505897879600525, 0.38057786226272583, 0.4358638525009155, 0.4221298396587372, 0.37908437848091125, 0.38369178771972656, 0.3746439814567566, 0.36504921317100525, 0.3768764138221741, 0.41595566272735596, 0.4059741795063019, 0.36521267890930176, 0.36811569333076477, 0.40306854248046875, 0.39932534098625183, 0.37550926208496094, 0.39822137355804443, 0.38861456513404846, 0.375042200088501, 0.4241117537021637, 0.44766679406166077, 0.42229682207107544, 0.4069075286388397, 0.372592031955719, 0.33715173602104187, 0.34381675720214844, 0.38447317481040955, 0.3949357569217682, 0.3589608371257782, 0.36023738980293274, 0.3734191060066223, 0.36055001616477966, 0.3458775281906128, 0.4113192558288574, 0.46490100026130676, 0.43123236298561096, 0.4103556275367737, 0.3891814351081848, 0.3787882626056671, 0.4149034321308136, 0.4408852159976959, 0.384807288646698, 0.3910160958766937, 0.4161364734172821, 0.3903489112854004, 0.4329696297645569, 0.4470439851284027, 0.4352726638317108, 0.4092283844947815, 0.40356627106666565, 0.3920864760875702, 0.35180336236953735, 0.3690439462661743, 0.3695223927497864, 0.37285977602005005, 0.3807477355003357, 0.38910341262817383, 0.4154600203037262, 0.40539708733558655, 0.3828776478767395, 0.3979257345199585, 0.4030965268611908, 0.3764788508415222, 0.37100499868392944, 0.376128613948822, 0.3891622722148895, 0.39964398741722107, 0.397924542427063, 0.3694554269313812, 0.34238332509994507, 0.35136398673057556, 0.3466775715351105, 0.32053542137145996, 0.31009066104888916, 0.3154548108577728, 0.3218615651130676, 0.3354693353176117, 0.35251349210739136, 0.3808412253856659, 0.36031875014305115, 0.3247736394405365, 0.3143714368343353, 0.29025644063949585, 0.31819331645965576, 0.3275229036808014, 0.26957404613494873, 0.24069646000862122, 0.2509600818157196, 0.2721013128757477, 0.3218974173069, 0.3379148542881012, 0.3391279876232147, 0.35477057099342346, 0.3122774064540863, 0.28907379508018494, 0.26127633452415466, 0.27174583077430725, 0.3145226538181305, 0.26994219422340393, 0.2655091881752014, 0.27674081921577454, 0.2580544650554657, 0.24641384184360504, 0.22764991223812103, 0.2633393704891205, 0.28490525484085083, 0.22884516417980194, 0.20068077743053436, 0.2081446349620819, 0.1691996455192566, 0.12604139745235443, 0.16754966974258423, 0.2303970754146576, 0.24956415593624115, 0.21513475477695465, 0.14939925074577332, 0.12210232764482498, 0.08341973274946213, 0.06872755289077759, 0.08759518712759018, 0.08676828444004059, 0.12776444852352142, 0.16027037799358368, 0.13295665383338928, 0.08134753257036209, 0.07757977396249771, 0.0713101476430893, 0.04413797706365585, 0.07162045687437057, 0.08646615594625473, 0.09258094429969788, 0.08519972860813141, 0.06007305532693863, 0.029393984004855156, -0.004730659071356058, 0.012075272388756275, 0.03314382582902908, 0.060689739882946014, 0.0810345783829689, 0.06891240179538727, 0.06869363784790039, 0.06015931814908981, 0.024453748017549515, -0.022727468982338905, -0.013939582742750645, 0.05860927700996399, 0.10408946871757507, 0.09776987135410309, 0.09346065670251846, 0.06871064007282257, 0.0237408634275198, 0.01144726388156414, 0.009992995299398899, 0.051026638597249985, 0.07804933935403824, 0.03807005658745766, 0.027966653928160667, 0.05139179527759552, 0.059175532311201096, 0.05797623097896576, 0.0645240992307663, 0.07072844356298447, 0.05304586887359619, 0.042133402079343796, 0.06204916164278984, 0.04282190278172493, 0.02581813745200634, 0.009863116778433323, -0.010559451766312122, 0.017547298222780228, 0.005519622005522251, -0.005481787491589785, -0.020114561542868614, -0.07000157982110977, -0.08455605059862137, -0.08487066626548767, -0.09105613827705383, -0.09063224494457245, -0.11028661578893661, -0.12421509623527527, -0.08011362701654434, -0.05917187035083771, -0.061164360493421555, -0.08317194133996964, -0.11133325845003128, -0.11652016639709473, -0.1209748163819313, -0.12923869490623474, -0.17997758090496063, -0.17784884572029114, -0.15868601202964783, -0.1706957221031189, -0.14923615753650665, -0.14066515862941742, -0.15489116311073303, -0.16371965408325195, -0.16069664061069489, -0.1534927785396576, -0.15805117785930634, -0.19541852176189423, -0.222704216837883, -0.26610279083251953, -0.2662503719329834, -0.1970423460006714, -0.20212861895561218, -0.20889119803905487, -0.22272926568984985, -0.2685690224170685, -0.2498251050710678, -0.23696422576904297, -0.24578432738780975, -0.24855369329452515, -0.2809341549873352, -0.2945394814014435, -0.30566444993019104, -0.3110761344432831, -0.29613038897514343, -0.3023243844509125, -0.2645263671875, -0.23136837780475616, -0.27086758613586426, -0.30555811524391174, -0.28737515211105347, -0.2821108400821686, -0.28427669405937195, -0.2682332992553711, -0.2788289487361908, -0.2803072929382324, -0.3019910454750061, -0.3253365159034729, -0.3186952471733093, -0.3028562068939209, -0.3001079261302948, -0.3300066590309143, -0.3330908417701721}, {-0.09994792193174362, -0.11962439119815826, -0.10353175550699234, -0.10857119411230087, -0.0975407138466835, -0.10169847309589386, -0.10419623553752899, -0.10011977702379227, -0.10739824175834656, -0.11306414008140564, -0.1047334149479866, -0.11391763389110565, -0.1269489824771881, -0.13103140890598297, -0.1283167600631714, -0.12672726809978485, -0.12256429344415665, -0.11197789013385773, -0.1225510835647583, -0.127065047621727, -0.13534337282180786, -0.14296957850456238, -0.12996596097946167, -0.13687638938426971, -0.14970701932907104, -0.1526072919368744, -0.15842965245246887, -0.1534164845943451, -0.14922869205474854, -0.15118055045604706, -0.141886368393898, -0.1385745108127594, -0.15126793086528778, -0.16573961079120636, -0.16551728546619415, -0.1554349809885025, -0.14193055033683777, -0.12650495767593384, -0.11480633914470673, -0.10120896995067596, -0.10902541130781174, -0.13003939390182495, -0.1531127244234085, -0.17721183598041534, -0.16370649635791779, -0.1375986784696579, -0.11770003288984299, -0.11037637293338776, -0.12091312557458878, -0.14594615995883942, -0.2005297690629959, -0.23771855235099792, -0.24120627343654633, -0.22393779456615448, -0.18643537163734436, -0.14268536865711212, -0.11127320677042007, -0.09704754501581192, -0.11305031180381775, -0.169209286570549, -0.21140502393245697, -0.22894823551177979, -0.21722517907619476, -0.18683262169361115, -0.1520082950592041, -0.11359807103872299, -0.10803831368684769, -0.11909422278404236, -0.16403381526470184, -0.19894607365131378, -0.20131739974021912, -0.20011816918849945, -0.15102310478687286, -0.1396547555923462, -0.14831775426864624, -0.14927057921886444, -0.18337377905845642, -0.1848442405462265, -0.18638628721237183, -0.16026727855205536, -0.12376182526350021, -0.09934362769126892, -0.05817044526338577, -0.05516081303358078, -0.08013266324996948, -0.1142791286110878, -0.14091607928276062, -0.1753677874803543, -0.17852981388568878, -0.17905759811401367, -0.1700560748577118, -0.1533929705619812, -0.1574300229549408, -0.11412449926137924, -0.12919814884662628, -0.13824273645877838, -0.1613447368144989, -0.21223761141300201, -0.2064344733953476, -0.19133427739143372, -0.1406831592321396, -0.1388634741306305, -0.15151046216487885, -0.16450339555740356, -0.1921345293521881, -0.21124261617660522, -0.20467744767665863, -0.17311713099479675, -0.15831777453422546, -0.1329701989889145, -0.14133886992931366, -0.12255013734102249, -0.11732081323862076, -0.13927452266216278, -0.11711817979812622, -0.11348146200180054, -0.10841589421033859, -0.08195535838603973, -0.06057226285338402, -0.061305347830057144, -0.05880201607942581, -0.05418756604194641, -0.0648375153541565, -0.09700310975313187, -0.10446159541606903, -0.08932163566350937, -0.07691141217947006, -0.035637155175209045, 5.688727833330631e-05, 0.004381988663226366, -0.015582814812660217, -0.052710991352796555, -0.11129812151193619, -0.13720430433750153, -0.1500120759010315, -0.13432498276233673, -0.0947595089673996, -0.10165277868509293, -0.08569087088108063, -0.09615428745746613, -0.12074773013591766, -0.12624377012252808, -0.13209643959999084, -0.10305644571781158, -0.07449965924024582, -0.04758734628558159, -0.020271843299269676, -0.00881312694400549, -0.022414715960621834, -0.034218672662973404, -0.029248716309666634, -0.006246726959943771, 0.031752802431583405, 0.046497054398059845, 0.03946823626756668, 0.03475983440876007, 0.047903694212436676, 0.052925486117601395, 0.06413859874010086, 0.08361437916755676, 0.06616223603487015, 0.023582562804222107, -0.025501947849988937, -0.05855322256684303, -0.10033947229385376, -0.08882986009120941, -0.01367687527090311, 0.03822048753499985, 0.11241403967142105, 0.1203625425696373, 0.08676137775182724, 0.07272087782621384, 0.028201015666127205, 0.03695883974432945, 0.06583039462566376, 0.1025254875421524, 0.12751634418964386, 0.11698959022760391, 0.10515732318162918, 0.06402552127838135, 0.039853695780038834, 0.04782472923398018, 0.061149727553129196, 0.08441037684679031, 0.10849040001630783, 0.10723382234573364, 0.09841576963663101, 0.11526837944984436, 0.13063743710517883, 0.13114410638809204, 0.14082929491996765, 0.14554251730442047, 0.14252158999443054, 0.12895247340202332, 0.11951650679111481, 0.14755801856517792, 0.16673551499843597, 0.20658454298973083, 0.25348418951034546, 0.26842793822288513, 0.25881707668304443, 0.21370655298233032, 0.18995146453380585, 0.1868065446615219, 0.1954771876335144, 0.21372511982917786, 0.25208067893981934, 0.2730892300605774, 0.25945332646369934, 0.2589276134967804, 0.24185380339622498, 0.2397637963294983, 0.23975898325443268, 0.2354113608598709, 0.2516745924949646, 0.2558706998825073, 0.26721006631851196, 0.29076191782951355, 0.31426018476486206, 0.3109114170074463, 0.2845839560031891, 0.2721503674983978, 0.27079394459724426, 0.2831577658653259, 0.29059892892837524, 0.291005939245224, 0.30118197202682495, 0.2933638393878937, 0.27483776211738586, 0.269435316324234, 0.28242531418800354, 0.2927139401435852, 0.29877111315727234, 0.3222566545009613, 0.35182785987854004, 0.3825486898422241, 0.3953903913497925, 0.3971389830112457, 0.39406105875968933, 0.3772681951522827, 0.33756011724472046, 0.30139675736427307, 0.3089078962802887, 0.3119831085205078, 0.3117419183254242, 0.33580657839775085, 0.3651560842990875, 0.3916337788105011, 0.41496148705482483, 0.4222065210342407, 0.4214162826538086, 0.4170536696910858, 0.398937851190567, 0.39465564489364624, 0.4026236832141876, 0.41055724024772644, 0.4055759310722351, 0.4007759988307953, 0.4160097539424896, 0.43319204449653625, 0.4375785291194916, 0.4236885607242584, 0.39181581139564514, 0.36481305956840515, 0.36527419090270996, 0.3643050789833069, 0.3883201479911804, 0.42446377873420715, 0.41976654529571533, 0.39699533581733704, 0.3856772482395172, 0.381778359413147, 0.38220369815826416, 0.4096032381057739, 0.41980433464050293, 0.4185553789138794, 0.41061171889305115, 0.39793452620506287, 0.3881622850894928, 0.3715258836746216, 0.3916380703449249, 0.4126463830471039, 0.4324183166027069, 0.4381665587425232, 0.44356435537338257, 0.44115254282951355, 0.4175683856010437, 0.4181065261363983, 0.39187297224998474, 0.3916023373603821, 0.4059198200702667, 0.3977578580379486, 0.4012296497821808, 0.389100581407547, 0.3854875862598419, 0.3979077935218811, 0.3847251534461975, 0.3865782618522644, 0.4260472357273102, 0.4276198446750641, 0.42497894167900085, 0.4214974045753479, 0.4206068515777588, 0.4138401746749878, 0.3903322219848633, 0.40035924315452576, 0.38313010334968567, 0.387683242559433, 0.40142080187797546, 0.3823452889919281, 0.3835024833679199, 0.38834020495414734, 0.390988826751709, 0.3909831941127777, 0.3865695893764496, 0.3690422475337982, 0.35936620831489563, 0.3610043525695801, 0.36348795890808105, 0.3659120500087738, 0.37513911724090576, 0.3820977807044983, 0.39646682143211365, 0.408132404088974, 0.39342761039733887, 0.38596677780151367, 0.3602036237716675, 0.3375759720802307, 0.33079901337623596, 0.3477686941623688, 0.3761981427669525, 0.38972991704940796, 0.3894626796245575, 0.367550253868103, 0.35796913504600525, 0.3431982696056366, 0.3480483889579773, 0.3415881097316742, 0.32947519421577454, 0.31935441493988037, 0.2979249358177185, 0.3078659176826477, 0.3135370910167694, 0.3420614004135132, 0.3540676236152649, 0.35666486620903015, 0.349386990070343, 0.3172683119773865, 0.30574697256088257, 0.28865373134613037, 0.2833276093006134, 0.2666991055011749, 0.24239185452461243, 0.23900704085826874, 0.27526572346687317, 0.30557453632354736, 0.31010347604751587, 0.31159159541130066, 0.2793470323085785, 0.2645336091518402, 0.25754624605178833, 0.2543703615665436, 0.2593342661857605, 0.24236811697483063, 0.24081335961818695, 0.23648594319820404, 0.21771909296512604, 0.2217126190662384, 0.21581275761127472, 0.22762122750282288, 0.2548814117908478, 0.22819294035434723, 0.21335329115390778, 0.19262206554412842, 0.16463284194469452, 0.17013214528560638, 0.18808600306510925, 0.21299326419830322, 0.20698916912078857, 0.19779641926288605, 0.18487393856048584, 0.1750701516866684, 0.16996583342552185, 0.15596862137317657, 0.16054731607437134, 0.15955840051174164, 0.1525723934173584, 0.15092453360557556, 0.15832728147506714, 0.16580551862716675, 0.1808888167142868, 0.17386390268802643, 0.1497776210308075, 0.1393614411354065, 0.11221929639577866, 0.11007978022098541, 0.11463478207588196, 0.13000912964344025, 0.1533515900373459, 0.12061122059822083, 0.0795946717262268, 0.07035554945468903, 0.08294548094272614, 0.09392234683036804, 0.08972930163145065, 0.06548599153757095, 0.04852929711341858, 0.03991379588842392, 0.031224288046360016, 0.039172254502773285, 0.06015210226178169, 0.07977551221847534, 0.07406746596097946, 0.06532882899045944, 0.028744744136929512, -0.0034865951165556908, -0.004647627007216215, -0.012922829017043114, 0.00285692629404366, 0.012585943564772606, 0.006719670724123716, -0.0017939937533810735, -0.010044789873063564, -0.010709414258599281, -0.012078255414962769, -0.0028731143102049828, 0.01550345215946436, 0.0010065512033179402, -0.020710913464426994, -0.004117028787732124, -0.008085801266133785, -0.00903233326971531, -0.019932616502046585, -0.04797927662730217, -0.03400309383869171, -0.03872649744153023, -0.04582834988832474, -0.03778964281082153, -0.06929195672273636, -0.09303196519613266, -0.10261025279760361, -0.10264366120100021, -0.0714557021856308, -0.08781681209802628, -0.10260650515556335, -0.09530782699584961, -0.10963466763496399, -0.09928926825523376, -0.0994051843881607, -0.1045951321721077, -0.10160116106271744, -0.1036926805973053, -0.13211064040660858, -0.1617400050163269, -0.17330455780029297, -0.18138845264911652, -0.16457676887512207, -0.1607702672481537, -0.1509513556957245, -0.15950234234333038, -0.1727813482284546, -0.151169091463089, -0.14882789552211761, -0.1630387306213379, -0.1829991340637207, -0.18763771653175354, -0.2043699324131012, -0.20931190252304077, -0.17731744050979614, -0.16224192082881927, -0.16079185903072357, -0.17869965732097626, -0.2003573179244995, -0.20782214403152466, -0.20740827918052673, -0.19896581768989563, -0.19556765258312225, -0.19849209487438202, -0.21513067185878754, -0.24276623129844666, -0.24781979620456696, -0.24885743856430054, -0.25135567784309387, -0.2239650934934616, -0.22711986303329468, -0.2541288733482361, -0.262139230966568, -0.28334084153175354, -0.27862101793289185, -0.27003878355026245, -0.2862944006919861, -0.28646120429039, -0.29656219482421875, -0.29326319694519043, -0.2768491804599762, -0.28460410237312317, -0.29289186000823975, -0.3009759187698364, -0.31511402130126953, -0.3198918104171753}}; 11 | 12 | }; // end namespace -------------------------------------------------------------------------------- /tests/test-headers/wav_stereo_8bit_44100.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace wav_stereo_8bit_44100 { 4 | 5 | int numSamplesPerChannel = 352800; 6 | int bitDepth = 8; 7 | uint32_t sampleRate = 44100; 8 | int numChannels = 2; 9 | 10 | std::vector> testBuffer = {{0.0, 0.0, 0.0, -0.0078125, 0.0078125, -0.0078125, 0.0078125, -0.0078125, 0.015625, -0.015625, 0.015625, -0.015625, 0.015625, -0.0078125, 0.0078125, -0.0078125, 0.015625, -0.015625, 0.015625, -0.0234375, 0.0234375, -0.0234375, 0.0234375, -0.015625, 0.0078125, -0.0078125, 0.0, 0.0, 0.0234375, -0.09375, 0.09375, 0.0078125, 0.0703125, 0.0546875, 0.0390625, 0.0859375, 0.015625, 0.078125, 0.015625, 0.078125, 0.0390625, -0.015625, 0.046875, 0.0234375, 0.0859375, 0.046875, 0.1328125, 0.0546875, 0.140625, 0.078125, 0.1015625, 0.109375, 0.078125, 0.1171875, 0.0703125, 0.1171875, 0.0546875, 0.125, 0.0546875, 0.09375, 0.1328125, 0.046875, 0.09375, 0.125, 0.0546875, 0.1328125, 0.0859375, 0.1015625, 0.1015625, 0.0546875, 0.1328125, 0.0625, 0.15625, 0.1015625, 0.1328125, 0.1328125, 0.046875, 0.1484375, 0.015625, 0.09375, -0.046875, 0.0625, -0.0078125, 0.03125, 0.0234375, -0.0078125, 0.0234375, -0.015625, 0.0546875, -0.03125, 0.0703125, 0.015625, 0.1015625, 0.046875, -0.0234375, 0.109375, 0.0234375, 0.2421875, 0.3984375, 0.40625, 0.0859375, 0.1015625, 0.21875, 0.2109375, -0.0859375, -0.1171875, -0.1484375, -0.203125, 0.0078125, -0.1875, -0.3046875, -0.2734375, -0.125, 0.1171875, -0.0234375, -0.234375, -0.21875, 0.046875, 0.1484375, 0.171875, -0.1171875, -0.1484375, -0.21875, -0.25, -0.2265625, -0.0078125, -0.046875, -0.1875, -0.1875, -0.1796875, -0.1640625, -0.203125, -0.2421875, -0.2734375, -0.203125, -0.2265625, -0.375, -0.3828125, -0.484375, -0.5, -0.2578125, -0.15625, -0.390625, -0.34375, -0.3046875, -0.3515625, -0.1640625, -0.21875, -0.3359375, -0.28125, -0.03125, -0.25, -0.125, -0.0625, -0.1484375, -0.1484375, -0.0390625, 0.078125, -0.1171875, -0.2265625, -0.125, 0.046875, -0.0859375, -0.296875, -0.109375, -0.0859375, -0.1328125, -0.265625, -0.1953125, -0.0859375, -0.015625, -0.1875, -0.1875, -0.09375, -0.1640625, -0.2265625, -0.21875, -0.0703125, -0.140625, -0.3046875, -0.140625, -0.0703125, -0.2734375, -0.171875, -0.0546875, -0.0390625, -0.03125, -0.1796875, -0.140625, -0.125, 0.03125, 0.0, -0.0859375, -0.0859375, 0.0, 0.09375, 0.140625, 0.0, 0.0234375, 0.1328125, 0.15625, 0.171875, 0.1796875, 0.1953125, 0.125, 0.15625, 0.2890625, 0.359375, 0.21875, 0.2734375, 0.2578125, 0.265625, 0.203125, 0.2109375, 0.2890625, 0.2578125, 0.1484375, 0.1875, 0.2265625, 0.1953125, 0.28125, 0.2265625, 0.2578125, 0.1015625, 0.2109375, 0.3359375, 0.2265625, 0.109375, 0.078125, 0.1640625, 0.2109375, 0.09375, 0.0625, -0.015625, 0.0625, 0.25, 0.078125, 0.03125, 0.2734375, 0.1953125, 0.171875, 0.1484375, 0.3046875, 0.25, 0.125, 0.2421875, 0.390625, 0.265625, 0.171875, 0.34375, 0.359375, 0.390625, 0.234375, 0.296875, 0.3671875, 0.5234375, 0.546875, 0.484375, 0.3828125, 0.359375, 0.40625, 0.3515625, 0.46875, 0.390625, 0.359375, 0.3125, 0.328125, 0.375, 0.421875, 0.34375, 0.359375, 0.3828125, 0.171875, 0.25, 0.2421875, 0.1796875, 0.2421875, 0.2421875, 0.2109375, 0.15625, 0.1328125, 0.1875, 0.1484375, 0.1015625, 0.1015625, 0.3359375, 0.15625, 0.125, 0.1328125, 0.109375, 0.1171875, 0.0546875, 0.015625, -0.015625, 0.2578125, 0.1015625, -0.0078125, -0.046875, -0.015625, -0.0546875, 0.015625, 0.171875, 0.0703125, 0.09375, 0.0, -0.015625, -0.0234375, 0.109375, 0.046875, 0.03125, 0.0234375, -0.046875, -0.03125, 0.0859375, 0.1796875, 0.0, -0.0625, 0.1171875, 0.203125, 0.03125, 0.078125, 0.1875, 0.234375, 0.1328125, 0.140625, 0.0546875, -0.0625, 0.03125, 0.0859375, 0.1171875, -0.03125, 0.125, 0.0859375, 0.140625, 0.1171875, -0.0234375, -0.0234375, -0.1328125, -0.046875, -0.0234375, 0.140625, 0.1171875, 0.1640625, 0.0390625, -0.03125, 0.046875, 0.0859375, 0.109375, 0.0, 0.0546875, 0.125, -0.0078125, 0.078125, 0.09375, 0.03125, 0.078125, 0.125, 0.0234375, 0.0234375, 0.0859375, 0.1484375, 0.109375, 0.015625, 0.171875, -0.0078125, 0.078125, 0.15625, 0.0625, 0.0625, 0.109375, 0.2734375, 0.2265625, 0.1640625, 0.1796875, 0.203125, 0.1640625, 0.1796875, 0.21875, 0.328125, 0.21875, 0.15625, 0.2578125, 0.34375, 0.2578125, 0.1328125, 0.375, 0.3359375, 0.2421875, 0.21875, 0.359375, 0.3359375, 0.359375, 0.28125, 0.375, 0.34375, 0.296875, 0.2890625, 0.2265625, 0.4453125, 0.359375, 0.3203125, 0.2734375, 0.296875, 0.3203125, 0.296875, 0.4765625, 0.3046875, 0.40625, 0.25, 0.328125, 0.15625, 0.2109375, 0.15625, 0.25, 0.3203125, 0.0625, 0.203125, 0.2421875, 0.203125, 0.09375, 0.140625, 0.2734375, 0.1953125, 0.0859375, 0.1640625, 0.2578125, 0.1484375, 0.125, 0.1171875, 0.140625, 0.1796875, 0.1640625, 0.1015625, 0.03125, 0.015625, 0.0703125, 0.1328125, -0.0234375, -0.0078125, 0.078125, 0.0546875, -0.046875, 0.0078125, 0.0859375, 0.140625, -0.078125, -0.1015625, -0.015625, -0.078125, 0.0078125, -0.125, 0.015625, -0.0234375, -0.03125, -0.0859375, 0.03125, -0.0078125, -0.109375, -0.0625, -0.140625, -0.125, -0.109375, -0.203125, -0.046875, -0.046875, -0.125, -0.1171875, -0.046875, -0.09375, -0.0859375, -0.0859375, -0.1015625, 0.0078125, -0.1328125, -0.1640625, -0.1484375, -0.046875, -0.1328125, -0.1484375, -0.1953125, -0.2578125, -0.0859375, -0.0625, -0.1328125, -0.2734375, -0.140625, -0.296875, -0.2578125, -0.2421875, -0.296875, -0.2578125, -0.34375, -0.2890625, -0.28125, -0.34375, -0.3046875, -0.2265625, -0.375, -0.3671875, -0.40625}, {0.0, 0.0, 0.0078125, -0.015625, 0.015625, -0.0234375, 0.0234375, -0.03125, 0.0234375, -0.0234375, 0.015625, -0.015625, 0.015625, -0.015625, 0.015625, -0.0078125, 0.0078125, 0.0, 0.0, 0.0078125, -0.0078125, 0.0078125, -0.0078125, 0.015625, -0.015625, 0.015625, -0.015625, 0.015625, -0.015625, 0.0078125, -0.0078125, 0.0, 0.0078125, -0.015625, 0.0234375, -0.0234375, 0.03125, -0.0234375, 0.015625, -0.015625, 0.0078125, 0.0078125, -0.0078125, -0.015625, 0.03125, 0.0, 0.0, -0.046875, 0.0078125, 0.0, -0.0078125, 0.0078125, 0.046875, 0.046875, 0.09375, 0.0390625, 0.09375, 0.0390625, 0.0078125, -0.0078125, 0.03125, 0.03125, -0.0546875, 0.0078125, -0.0546875, -0.0078125, -0.015625, 0.0078125, 0.015625, 0.0078125, 0.046875, -0.0078125, 0.046875, -0.03125, 0.0703125, -0.046875, 0.015625, -0.0078125, 0.0234375, 0.015625, -0.0546875, 0.0234375, -0.0078125, 0.03125, -0.015625, 0.0078125, -0.0078125, 0.0078125, -0.0078125, 0.0, -0.0078125, 0.0078125, 0.0234375, 0.015625, 0.046875, 0.015625, 0.09375, 0.1328125, 0.4375, 0.328125, 0.0546875, 0.0625, 0.2265625, 0.1875, -0.1015625, -0.0625, -0.21875, -0.1796875, -0.0546875, -0.0703125, -0.3046875, -0.234375, -0.09375, 0.140625, 0.1015625, -0.2421875, -0.078125, 0.046875, 0.2578125, 0.21875, 0.0, -0.046875, -0.0390625, -0.2265625, -0.125, 0.0859375, -0.0234375, -0.1171875, -0.234375, -0.0625, -0.1796875, -0.09375, -0.1796875, -0.2578125, -0.0703125, -0.21875, -0.2890625, -0.375, -0.4140625, -0.484375, -0.2265625, -0.140625, -0.3671875, -0.3515625, -0.3203125, -0.359375, -0.203125, -0.109375, -0.3984375, -0.1484375, -0.0546875, -0.1640625, -0.1171875, -0.0859375, -0.1640625, -0.140625, -0.0703125, 0.0625, -0.140625, -0.1484375, -0.0625, 0.09375, -0.03125, -0.2265625, 0.03125, 0.0, -0.078125, -0.2109375, -0.234375, -0.0546875, -0.0390625, -0.1796875, -0.171875, -0.1796875, -0.15625, -0.265625, -0.203125, -0.1328125, -0.140625, -0.3515625, -0.125, -0.140625, -0.3359375, -0.25, -0.1171875, -0.078125, -0.0625, -0.125, -0.234375, -0.03125, 0.0703125, 0.046875, 0.0078125, -0.0859375, -0.046875, 0.171875, 0.0703125, 0.0546875, 0.0625, 0.21875, 0.3046875, 0.2109375, 0.2890625, 0.2578125, 0.234375, 0.2265625, 0.3515625, 0.40625, 0.265625, 0.21875, 0.3125, 0.1875, 0.1875, 0.1171875, 0.21875, 0.21875, 0.1328125, 0.2109375, 0.25, 0.25, 0.25, 0.234375, 0.2421875, 0.0703125, 0.1953125, 0.3359375, 0.1875, 0.1640625, 0.140625, 0.2109375, 0.1953125, 0.1171875, 0.0625, 0.0546875, 0.0625, 0.3046875, 0.0546875, 0.0234375, 0.25, 0.21875, 0.1484375, 0.1640625, 0.2421875, 0.140625, 0.140625, 0.25, 0.3671875, 0.2890625, 0.1484375, 0.3203125, 0.3515625, 0.2578125, 0.25, 0.1484375, 0.34375, 0.3515625, 0.4921875, 0.3828125, 0.3046875, 0.3515625, 0.296875, 0.3046875, 0.34375, 0.3359375, 0.1796875, 0.328125, 0.1953125, 0.328125, 0.375, 0.2109375, 0.3671875, 0.328125, 0.2109375, 0.21875, 0.234375, 0.140625, 0.203125, 0.265625, 0.25, 0.1875, 0.125, 0.15625, 0.1171875, 0.1640625, 0.15625, 0.34375, 0.125, 0.078125, 0.15625, 0.1328125, 0.0546875, 0.046875, -0.0859375, -0.0390625, 0.1875, 0.2109375, -0.015625, -0.0390625, -0.0390625, -0.0625, 0.1171875, 0.1796875, 0.1640625, 0.0546875, 0.0546875, 0.0, 0.0625, 0.1171875, 0.1640625, 0.078125, 0.140625, 0.078125, 0.1015625, 0.2265625, 0.296875, 0.1171875, 0.0546875, 0.171875, 0.1953125, 0.046875, 0.078125, 0.25, 0.2578125, 0.25, 0.1796875, 0.09375, 0.03125, 0.1484375, 0.2109375, 0.1796875, 0.0625, 0.15625, 0.1796875, 0.2265625, 0.15625, 0.125, 0.0, 0.0078125, 0.0078125, 0.125, 0.1796875, 0.1796875, 0.1953125, 0.1171875, 0.109375, 0.078125, 0.1484375, 0.1484375, 0.0546875, 0.09375, 0.2109375, 0.09375, 0.1328125, 0.171875, 0.0390625, 0.1484375, 0.15625, 0.09375, -0.0234375, 0.0546875, 0.15625, 0.109375, 0.0625, 0.125, 0.0703125, 0.109375, 0.1796875, 0.0703125, 0.1328125, 0.1796875, 0.265625, 0.1796875, 0.0859375, 0.125, 0.1171875, 0.109375, 0.1015625, 0.1796875, 0.2578125, 0.171875, 0.0625, 0.2578125, 0.3125, 0.2734375, 0.109375, 0.2890625, 0.3046875, 0.2421875, 0.171875, 0.3359375, 0.3125, 0.2578125, 0.2734375, 0.3359375, 0.3203125, 0.25, 0.15625, 0.234375, 0.3203125, 0.3515625, 0.2109375, 0.2109375, 0.1796875, 0.203125, 0.1953125, 0.3125, 0.2578125, 0.28125, 0.2421875, 0.203125, 0.1328125, 0.1640625, 0.1328125, 0.1484375, 0.2265625, -0.0078125, 0.125, 0.25, 0.1796875, 0.1328125, 0.140625, 0.2265625, 0.2421875, 0.078125, 0.1484375, 0.2578125, 0.1015625, 0.0859375, 0.0859375, 0.09375, 0.171875, 0.125, 0.0546875, 0.0, -0.0859375, 0.078125, 0.0390625, -0.0078125, -0.046875, 0.046875, 0.03125, 0.0, 0.0078125, 0.0390625, 0.1171875, -0.0390625, 0.0, 0.046875, 0.03125, 0.0546875, 0.0078125, 0.03125, 0.03125, -0.0078125, -0.0390625, 0.15625, 0.03125, -0.0234375, -0.03125, 0.015625, -0.0078125, -0.015625, -0.0625, 0.03125, 0.03125, -0.0703125, -0.0859375, 0.0234375, -0.03125, -0.0390625, -0.109375, -0.0625, 0.0078125, -0.0234375, -0.1171875, -0.0234375, -0.046875, -0.0703125, -0.1171875, -0.1875, -0.1875, -0.0859375, -0.1015625, -0.234375, -0.2109375, -0.1796875, -0.2265625, -0.34375, -0.2109375, -0.25, -0.25, -0.3359375, -0.2265625, -0.28125, -0.296875, -0.234375, -0.1875, -0.25, -0.2890625, -0.3046875}}; 11 | 12 | }; // end namespace -------------------------------------------------------------------------------- /tests/test-headers/wav_stereo_8bit_48000.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace wav_stereo_8bit_48000 { 4 | 5 | int numSamplesPerChannel = 384000; 6 | int bitDepth = 8; 7 | uint32_t sampleRate = 48000; 8 | int numChannels = 2; 9 | 10 | std::vector> testBuffer = {{0.0078125, -0.0078125, -0.0078125, -0.0078125, 0.03125, 0.03125, -0.0859375, -0.0703125, 0.140625, 0.0625, 0.0234375, -0.140625, -0.1171875, 0.109375, 0.15625, 0.046875, -0.171875, -0.1875, 0.0234375, -0.0546875, 0.171875, 0.0859375, 0.078125, 0.1171875, -0.015625, 0.0078125, -0.1015625, -0.171875, -0.09375, -0.0703125, 0.0546875, 0.0234375, 0.0703125, 0.1015625, 0.0, 0.03125, -0.0625, -0.046875, 0.0546875, -0.015625, 0.0078125, -0.0703125, -0.015625, -0.0859375, -0.046875, -0.09375, -0.015625, -0.03125, -0.03125, 0.015625, 0.03125, 0.109375, -0.0234375, 0.1171875, 0.0546875, 0.0, 0.140625, 0.1328125, 0.2265625, 0.3046875, 0.1015625, 0.171875, 0.21875, 0.03125, 0.1953125, 0.203125, 0.0234375, 0.0078125, 0.078125, 0.0859375, -0.0625, -0.0390625, 0.0078125, 0.046875, -0.1171875, -0.140625, 0.0546875, 0.0859375, -0.0078125, 0.1015625, 0.078125, 0.15625, 0.109375, 0.109375, 0.2421875, 0.1171875, 0.0546875, 0.1796875, 0.2734375, 0.3125, 0.1953125, 0.2265625, 0.2734375, 0.15625, 0.109375, 0.140625, 0.1484375, 0.2265625, 0.1328125, 0.140625, 0.09375, 0.0625, 0.046875, 0.078125, 0.03125, 0.078125, 0.0625, 0.0078125, -0.0625, -0.15625, -0.1796875, -0.15625, -0.234375, -0.0625, -0.09375, -0.1875, 0.0, -0.0078125, -0.015625, -0.015625, -0.125, 0.03125, -0.0859375, 0.015625, 0.0546875, 0.0703125, 0.0546875, -0.078125, -0.046875, 0.2109375, 0.1484375, 0.0, 0.1015625, 0.15625, 0.1171875, 0.25, 0.1875, 0.1171875, 0.078125, 0.046875, 0.203125, 0.21875, 0.234375, 0.109375, 0.0, -0.0546875, -0.0234375, 0.1484375, 0.1171875, 0.03125, 0.03125, -0.171875, -0.09375, -0.0703125, -0.0546875, -0.2265625, -0.2109375, 0.125, 0.046875, -0.1796875, -0.125, -0.0234375, -0.0078125, -0.15625, -0.1328125, -0.0703125, 0.015625, -0.15625, -0.1875, -0.140625, -0.171875, -0.03125, 0.1484375, 0.1328125, 0.0234375, -0.109375, 0.0859375, -0.0234375, -0.2109375, 0.0390625, 0.015625, 0.0625, 0.0234375, 0.0546875, 0.265625, 0.0703125, 0.0703125, 0.09375, 0.21875, 0.15625, -0.0625, 0.0, 0.15625, 0.125, 0.125, 0.109375, 0.0078125, 0.0, 0.265625, 0.1171875, -0.046875, 0.1015625, 0.1796875, 0.140625, -0.0078125, -0.0234375, 0.0, -0.015625, -0.09375, 0.078125, -0.0234375, -0.1875, -0.1484375, 0.0234375, 0.09375, 0.0703125, 0.0234375, 0.015625, -0.03125, -0.0078125, 0.125, 0.0546875, 0.0, -0.1640625, 0.078125, 0.125, -0.046875, -0.03125, -0.015625, -0.0625, 0.0625, 0.125, -0.1171875, -0.1640625, -0.078125, -0.1328125, 0.0390625, 0.09375, -0.0390625, -0.1484375, -0.1484375, -0.0546875, 0.140625, 0.0703125, 0.0703125, -0.0703125, 0.0390625, 0.1484375, -0.0078125, 0.1328125, 0.046875, 0.015625, -0.1015625, 0.078125, 0.2265625, 0.0703125, 0.0546875, 0.1796875, 0.1953125, 0.171875, 0.0, 0.015625, 0.1640625, 0.015625, 0.109375, 0.0859375, 0.03125, 0.03125, 0.046875, 0.0703125, 0.0859375, -0.03125, 0.0546875, 0.1171875, 0.078125, 0.1328125, -0.03125, 0.078125, 0.0, 0.0234375, 0.1171875, -0.140625, -0.0390625, 0.1328125, -0.09375, -0.0234375, -0.125, 0.046875, 0.1015625, -0.1015625, -0.0234375, -0.0390625, -0.015625, -0.078125, -0.1171875, -0.2734375, -0.09375, -0.0078125, -0.0703125, -0.09375, -0.0625, -0.03125, -0.1484375, -0.0078125, -0.078125, -0.109375, -0.0234375, -0.015625, -0.1484375, -0.0390625, -0.046875, -0.203125, -0.0859375, -0.015625, -0.046875, -0.203125, -0.09375, -0.0234375, -0.2734375, -0.0625, 0.140625, -0.0859375, -0.0078125, -0.0234375, 0.0390625, 0.109375, -0.0234375, -0.03125, 0.0546875, 0.25, 0.0859375, 0.0390625, 0.2421875, 0.2109375, -0.0078125, 0.0390625, 0.109375, -0.0390625, 0.15625, 0.1484375, 0.0, 0.046875, -0.015625, 0.125, 0.140625, -0.15625, 0.0625, 0.046875, 0.0, -0.015625, -0.0078125, -0.0625, 0.0, 0.078125, 0.046875, 0.0, -0.1015625, 0.03125, 0.125, 0.0703125, 0.0078125, 0.1484375, 0.0625, 0.0234375, 0.0546875, 0.03125, 0.0234375, 0.171875, 0.09375, -0.03125, 0.1015625, -0.0546875, -0.078125, -0.0859375, 0.03125, 0.046875, 0.0390625, 0.0546875, 0.0, 0.03125, -0.109375, -0.0546875, -0.0390625, -0.0859375, -0.203125, -0.125, -0.0234375, -0.0234375, -0.0703125, 0.015625, -0.109375, -0.203125, -0.0859375, 0.015625, -0.0390625, -0.0859375, -0.109375, -0.0703125, 0.0, -0.015625, -0.1015625, -0.015625, -0.171875, -0.171875, -0.046875, -0.03125, -0.15625, -0.03125, -0.09375, -0.1875, -0.1796875, -0.09375, -0.125, -0.1328125, -0.21875, -0.046875, -0.1328125, -0.15625, 0.0078125, -0.0859375, -0.1640625, -0.046875, 0.0703125, 0.1640625, 0.046875, -0.0625, 0.015625, -0.046875, 0.0859375, 0.09375, 0.0390625, 0.0, 0.0546875, 0.078125, -0.0234375, 0.09375, 0.09375, 0.03125, 0.1328125, 0.078125, 0.046875, 0.0625, 0.0703125, 0.078125, 0.140625, 0.2578125, 0.28125, 0.1328125, 0.09375, 0.1015625, 0.1171875, 0.1796875, 0.046875, 0.0703125, 0.171875, 0.1953125, -0.03125, 0.0703125, 0.0234375, 0.1015625, 0.0703125, 0.1171875, 0.2734375, 0.2421875, 0.15625, 0.15625, 0.09375, 0.1796875, 0.15625, -0.03125, 0.21875, 0.1015625, 0.046875, 0.0859375, 0.078125, 0.0234375, 0.0234375, 0.1328125, 0.0078125, -0.078125, -0.015625, 0.09375, 0.0078125, 0.0546875, 0.109375, 0.109375, -0.0234375, 0.1015625, 0.0703125, -0.0390625, 0.0390625, -0.0546875, -0.0234375, 0.0625, 0.1171875, 0.0703125, 0.0390625, 0.0390625, 0.046875, 0.1328125}, {0.0078125, -0.0078125, -0.0078125, -0.015625, 0.0546875, 0.015625, -0.09375, -0.0703125, 0.171875, 0.046875, 0.0078125, -0.1484375, -0.109375, 0.1015625, 0.1640625, 0.046875, -0.1875, -0.1796875, 0.015625, 0.0, 0.1484375, 0.109375, 0.0234375, 0.125, -0.015625, 0.046875, -0.109375, -0.15625, -0.09375, -0.0625, 0.0234375, 0.0, 0.109375, 0.0546875, 0.0078125, 0.0546875, -0.0390625, -0.0703125, 0.0546875, -0.0234375, 0.0234375, -0.0390625, -0.015625, -0.0390625, -0.046875, 0.0, 0.0234375, 0.046875, 0.046875, 0.0390625, 0.15625, 0.1171875, 0.0859375, 0.1015625, 0.1484375, 0.0546875, 0.1953125, 0.1875, 0.234375, 0.296875, 0.140625, 0.203125, 0.171875, 0.078125, 0.109375, 0.2421875, 0.0390625, -0.015625, 0.0703125, 0.0, -0.0234375, -0.125, 0.0234375, -0.0234375, -0.109375, -0.21875, 0.0, 0.0234375, -0.0234375, -0.0078125, 0.03125, 0.1171875, 0.0546875, 0.1171875, 0.1640625, 0.15625, 0.0390625, 0.1796875, 0.3046875, 0.3046875, 0.1875, 0.21875, 0.3046875, 0.109375, 0.140625, 0.125, 0.1953125, 0.1640625, 0.09375, 0.0546875, 0.078125, -0.015625, -0.0546875, 0.015625, -0.0859375, 0.046875, -0.0234375, -0.0234375, -0.109375, -0.15625, -0.125, -0.140625, -0.21875, -0.046875, -0.0703125, -0.21875, 0.03125, -0.0234375, 0.03125, -0.015625, -0.0234375, 0.0546875, -0.03125, 0.03125, 0.078125, 0.1015625, 0.0546875, -0.03125, 0.0, 0.265625, 0.1953125, 0.0390625, 0.1171875, 0.140625, 0.1015625, 0.25, 0.171875, 0.09375, 0.0859375, 0.0, 0.1953125, 0.1484375, 0.2109375, 0.078125, -0.0703125, -0.046875, -0.109375, 0.1640625, 0.0390625, -0.0078125, -0.0546875, -0.2109375, -0.1640625, -0.0703125, -0.140625, -0.21875, -0.28125, 0.109375, -0.0078125, -0.21875, -0.140625, -0.0625, -0.0546875, -0.1875, -0.1796875, -0.09375, -0.03125, -0.1640625, -0.21875, -0.1796875, -0.1796875, -0.09375, 0.140625, 0.0625, 0.0078125, -0.15625, 0.0703125, -0.0625, -0.21875, -0.0078125, 0.0078125, 0.0078125, 0.0, 0.0234375, 0.25, 0.0859375, 0.0390625, 0.109375, 0.1875, 0.15625, -0.09375, 0.0390625, 0.1640625, 0.203125, 0.1484375, 0.1875, 0.0390625, 0.0859375, 0.3125, 0.1796875, 0.0078125, 0.1484375, 0.2421875, 0.1796875, 0.0703125, 0.0078125, 0.09375, 0.0, 0.0078125, 0.09375, 0.0625, -0.171875, -0.078125, 0.0234375, 0.125, 0.0625, 0.0234375, 0.015625, -0.0546875, -0.0078125, 0.0859375, 0.0546875, -0.0390625, -0.1640625, 0.0234375, 0.1015625, -0.109375, -0.0625, -0.0703125, -0.09375, 0.015625, 0.09375, -0.1796875, -0.2109375, -0.140625, -0.1640625, -0.0234375, 0.078125, -0.1171875, -0.15625, -0.2265625, -0.0703125, 0.0625, 0.0234375, 0.0078125, -0.140625, -0.0078125, 0.0546875, -0.03125, 0.03125, 0.0546875, -0.0625, -0.0703125, 0.03125, 0.2734375, 0.03125, 0.078125, 0.15625, 0.1953125, 0.1796875, -0.03125, 0.0703125, 0.125, 0.1015625, 0.09375, 0.1875, 0.0546875, 0.1015625, 0.09375, 0.1171875, 0.1484375, 0.0, 0.1484375, 0.15625, 0.1875, 0.1875, 0.0703125, 0.140625, 0.0703125, 0.0859375, 0.140625, -0.0859375, -0.015625, 0.1796875, -0.0625, 0.0234375, -0.0625, 0.125, 0.171875, -0.0078125, 0.015625, 0.0625, -0.015625, 0.015625, -0.1171875, -0.1953125, -0.078125, 0.0234375, -0.0390625, -0.1015625, -0.0078125, -0.046875, -0.0859375, -0.0390625, -0.0234375, -0.1328125, 0.0390625, -0.0078125, -0.0859375, -0.0234375, 0.0078125, -0.1796875, -0.0390625, 0.015625, -0.0078125, -0.15625, -0.0625, 0.0078125, -0.265625, -0.046875, 0.1171875, -0.09375, -0.0390625, -0.0390625, 0.0078125, 0.0859375, -0.0625, -0.0625, 0.0078125, 0.2109375, 0.0390625, 0.0234375, 0.2109375, 0.2109375, -0.0546875, 0.0390625, 0.0546875, -0.0390625, 0.109375, 0.1328125, -0.046875, 0.0, -0.0625, 0.0859375, 0.1015625, -0.1875, 0.0078125, 0.015625, -0.078125, -0.0625, -0.078125, -0.109375, -0.0546875, 0.03125, -0.015625, -0.0625, -0.171875, -0.0390625, 0.0703125, 0.0078125, -0.03125, 0.0703125, 0.0234375, -0.0390625, 0.046875, 0.0, 0.03125, 0.1796875, 0.109375, 0.0078125, 0.109375, -0.0078125, -0.0859375, -0.0625, 0.015625, 0.046875, 0.0234375, 0.046875, 0.015625, 0.03125, -0.0859375, -0.046875, -0.03125, -0.0546875, -0.2109375, -0.0859375, -0.0390625, 0.0078125, -0.078125, 0.0390625, -0.1015625, -0.1875, -0.0703125, 0.0234375, -0.0390625, -0.0859375, -0.109375, -0.0625, 0.0, -0.0078125, -0.1015625, -0.015625, -0.1796875, -0.171875, -0.0625, -0.046875, -0.171875, -0.0546875, -0.1171875, -0.2109375, -0.1875, -0.1328125, -0.09375, -0.1640625, -0.1640625, -0.0625, -0.0703125, -0.140625, 0.0703125, -0.0625, -0.125, -0.03125, 0.078125, 0.171875, 0.0078125, -0.046875, -0.03125, -0.0390625, 0.0390625, 0.09375, 0.0, -0.0078125, 0.046875, 0.09375, -0.0078125, 0.1328125, 0.125, 0.0703125, 0.15625, 0.1015625, 0.0546875, 0.09375, 0.0703125, 0.0859375, 0.140625, 0.265625, 0.2890625, 0.15625, 0.1328125, 0.1328125, 0.1640625, 0.203125, 0.09375, 0.109375, 0.2265625, 0.2421875, 0.0234375, 0.1171875, 0.0859375, 0.140625, 0.1171875, 0.140625, 0.28125, 0.25, 0.1484375, 0.171875, 0.0703125, 0.2109375, 0.109375, 0.0078125, 0.15625, 0.1171875, 0.0, 0.0859375, 0.0390625, 0.015625, 0.0, 0.1171875, 0.0078125, -0.09375, 0.015625, 0.078125, 0.046875, 0.03125, 0.1484375, 0.0703125, 0.0078125, 0.0703125, 0.078125, -0.0625, 0.03125, -0.078125, -0.0234375, 0.0546875, 0.1328125, 0.0859375, 0.0625, 0.0703125, 0.0703125, 0.1640625}}; 11 | 12 | }; // end namespace --------------------------------------------------------------------------------